For a ExtJS extension to a string in JavaScript, refer to its Help documentation, document: http://download.csdn.net/detail/z1137730824/7748893
Some of these methods are described below:
(1) Capitalize
Capitalize (String String): String
Returns a string in which the first letter in the string is uppercase
Parameters
- string : String
The string to convert
Returns
(2) ellipsis
Ellipsis (String value, number length, Boolean word): String
Crop a string greater than the specified length, increasing the display of the ellipsis (' ... ')
Parameters
(3) Trim
TrimString String): String
Crop whitespace characters on both sides of the string, preserving the middle whitespace, for example: @example
vars= ' foo bar ';Alert('-' +s+ '-'); //print "-foo Bar-"Alert('-' + Ext.String.Trim(s) + '-'); //print "-foo bar-"
Parameters
- string : String
The string to clip
Returns
(4) uncapitalize
Uncapitalize (String String): String
Returns a string in which the first letter of the string is a lowercase letter
Parameters
- string : String
The string to convert
Returns
(5) Urlappend
Urlappend (string URL, string string): String
Append the content to the URL of the query string, according to the processing logic to determine the placement of a '? ' or ' & ' symbol.
Parameters
Returns
ExtJS Learning-----------Ext.string,extjs extension to String in JavaScript