diff --git a/source/Ox/js/String.js b/source/Ox/js/String.js index 8f28a701..176749f4 100644 --- a/source/Ox/js/String.js +++ b/source/Ox/js/String.js @@ -26,7 +26,8 @@ Ox.clean = function(string) { /*@ Ox.endsWith Tests if a string ends with a given substring - Equivalent to `new RegExp(Ox.escapeRegExp(substring) + '$').test(string)`. + Equivalent to (but faster than) + `new RegExp(Ox.escapeRegExp(substring) + '$').test(string)`. (string, substring) -> True if string ends with substring > Ox.endsWith('foobar', 'bar') true @@ -403,7 +404,8 @@ Ox.splice = function(string, index, remove) { /*@ Ox.startsWith Tests if a string ends with a given substring - Equivalent to `new RegExp('^' + Ox.escapeRegExp(substring)).test(string)`. + Equivalent to (but faster than) + `new RegExp('^' + Ox.escapeRegExp(substring)).test(string)`. (string, substring) -> True if string starts with substring > Ox.startsWith('foobar', 'foo') true