forked from 0x2620/oxjs
make Ox.reverse() work for arrays
This commit is contained in:
parent
1576ba4c48
commit
1f7796b0f8
4 changed files with 18 additions and 12 deletions
|
|
@ -410,15 +410,6 @@ Ox.repeat = function(val, num) {
|
|||
return ret;
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.reverse <f> Reverses a string
|
||||
> Ox.reverse('foobar')
|
||||
'raboof'
|
||||
@*/
|
||||
Ox.reverse = function(str) {
|
||||
return str.toString().split('').reverse().join('');
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.startsWith <f> Checks if a string starts with a given substring
|
||||
If the substring is a string literal (and not a variable),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue