Skip to content

Commit

Permalink
updating docs for startsWith/endsWith
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewplummer committed Apr 29, 2014
1 parent 0c4bbcd commit b75aa12
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/string.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,11 @@
/***
* @method startsWith(<search>, [pos] = 0)
* @returns Boolean
* @short Returns true if the string starts with <search>.
* @short Returns true if the string starts with <search>, which must be a string.
* @extra Search begins at [pos], which defaults to the entire string length.
* @example
*
* 'hello'.startsWith('hell') -> true
* 'hello'.startsWith(/[a-h]/) -> true
* 'hello'.startsWith('HELL') -> false
* 'hello'.startsWith('ell', 1) -> true
*
Expand All @@ -437,12 +436,11 @@
/***
* @method endsWith(<search>, [pos] = length)
* @returns Boolean
* @short Returns true if the string ends with <search>.
* @short Returns true if the string ends with <search>, which must be a string.
* @extra Search ends at [pos], which defaults to the entire string length.
* @example
*
* 'jumpy'.endsWith('py') -> true
* 'jumpy'.endsWith(/[q-z]/) -> true
* 'jumpy'.endsWith('MPY') -> false
* 'jumpy'.endsWith('mp', 4) -> false
*
Expand Down

0 comments on commit b75aa12

Please sign in to comment.