Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tomjack

tomjack/app.js Secret

Created September 5, 2011 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomjack/1a5f9767b2733e7a81b8 to your computer and use it in GitHub Desktop.
Save tomjack/1a5f9767b2733e7a81b8 to your computer and use it in GitHub Desktop.
goog.scope = function(fn) {
fn.call(goog.global)
};
goog.provide("goog.string");
goog.provide("goog.string.Unicode");
goog.string.Unicode = {NBSP:"\u00a0"};
goog.string.startsWith = function(str, prefix) {
return str.lastIndexOf(prefix, 0) == 0
};
goog.string.endsWith = function(str, suffix) {
var l = str.length - suffix.length;
return l >= 0 && str.indexOf(suffix, l) == l
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment