|
CORE
NATIVE
TABLE
MAKE
CUSTOMIZE
EFFECTS
effects_base.js
effects_morph.js
effects_fade.js
effects_move.js
effects_extra.js
effects_toggle.js
effects_cycle.js
effects_cycles.js
VIRTUAL BOX
PLUG-IN
|
string.js
Contains prototypes which extend the String constructor Contains Class String Summary
Extends the native String object with many methods which are very useful but aren't contained in the core Javascript language.Others are shortcuts to existing Javascript String native methods. Extends Class String Methods
top method upper converts the string to upper case
Example var s = 'a string'; // returns 'A STRING' s.upper(); top method lower converts the string to lower case
Example var s = 'A STRING'; // returns 'a string' s.lower(); top method firstChar tests if the passed in character is the first of the string
Arguments
Example var s = 'a string'; // returns true s.firstChar('a'); // returns false s.firstChar('f'); top method hasChar tests if the string contains the passed in character
Arguments
Example var s = 'a string'; // returns true s.hasChar('a'); // returns false s.hasChar('f'); top method lastChar tests if the passed in character is the last of the string
Arguments
Example var s = 'a string'; // returns true s.lastChar('g'); // returns false s.lastChar('f'); top method stripPhp strips all php tags from the string
Example var s = '<?php a string ?>'; //returns 'a string' s.stripPhp(); top method stripJs strips all script tags from the string
Example var s = '<script type='text/javascript'> <i> a string </i> </script>'; // returns '<i> a string </i>' s.stripJs(); top method globalReplace replaces all occurrences with a regular expression
Arguments
Example var s = 'some data some'; // returns 'many data many' s.globalReplace('some', 'many'); top method contains tests if a string contains the passed in substring
Arguments
Example var s = 'some data'; // returns true s.contains('some'); top method posOf returns an array which represents the position of all occurences in the string
Arguments
Example var s = 'insert a string'; // returns [2,9] s.posOf('s'); top method getFirst returns the first character of the string
Example var s = 'some data'; // returns 's' s.getFirst(); top method getLast returns the last character of the string
Example var s = 'insert a string'; // returns 'g' s.getLast(); top method camelize returns a string camelized
Example var s = 'a string'; // returns 'A StRiNg' s = s.camelize(); top method upperFirst converts the first char of the string to upper case
Example var s = 'england'; // returns 'England' s.upperFirst('s');
Documentation By
Riccardo Degni -
powered by MakeDocs, CMS by RD |