Ext.data.JsonP.Ext_String({"mixins":[],"code_type":"assignment","inheritable":false,"component":false,"meta":{},"mixedInto":[],"uses":[],"aliases":{},"parentMixins":[],"superclasses":[],"members":{"event":[],"property":[],"css_var":[],"method":[{"meta":{},"owner":"Ext.String","tagname":"method","name":"addCharacterEntities","id":"method-addCharacterEntities"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"capitalize","id":"method-capitalize"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"createVarName","id":"method-createVarName"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"ellipsis","id":"method-ellipsis"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"escape","id":"method-escape"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"escapeRegex","id":"method-escapeRegex"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"format","id":"method-format"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"htmlDecode","id":"method-htmlDecode"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"htmlEncode","id":"method-htmlEncode"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"leftPad","id":"method-leftPad"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"repeat","id":"method-repeat"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"resetCharacterEntities","id":"method-resetCharacterEntities"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"splitWords","id":"method-splitWords"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"toggle","id":"method-toggle"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"trim","id":"method-trim"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"uncapitalize","id":"method-uncapitalize"},{"meta":{},"owner":"Ext.String","tagname":"method","name":"urlAppend","id":"method-urlAppend"}],"css_mixin":[],"cfg":[]},"tagname":"class","extends":null,"html":"
Files
A collection of useful static methods to deal with strings
\nAdds a set of character entity definitions to the set used by\nhtmlEncode and htmlDecode.
\n\nThis object should be keyed by the entity name sequence,\nwith the value being the textual representation of the entity.
\n\n Ext.String.addCharacterEntities({\n 'Ü':'Ü',\n 'ç':'ç',\n 'ñ':'ñ',\n 'è':'è'\n });\n var s = Ext.String.htmlEncode(\"A string with entities: èÜçñ\");\n
\n\nNote: the values of the character entites defined on this object are expected\nto be single character values. As such, the actual values represented by the\ncharacters are sensitive to the character encoding of the javascript source\nfile when defined in string literal form. Script tasgs referencing server\nresources with character entities must ensure that the 'charset' attribute\nof the script node is consistent with the actual character encoding of the\nserver resource.
\n\nThe set of character entities may be reset back to the default state by using\nthe resetCharacterEntities method
\nThe set of character entities to add to the current\ndefinitions.
\nConverts a string of characters into a legal, parseable Javascript var
name as long as the passed\nstring contains at least one alphabetic character. Non alphanumeric characters, and leading non alphabetic\ncharacters will be removed.
A string to be converted into a var
name.
A legal Javascript var
name.
Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each\ntoken must be unique, and must increment in the format {0}, {1}, etc. Example usage:
\n\n var cls = 'my-class', text = 'Some text';\n var s = Ext.String.format('<div class=\"{0}\">{1}</div>', cls, text);\n // s now contains the string: '<div class=\"my-class\">Some text</div>'\n
\n\nThe tokenized string to be formatted
\nThe value to replace token {0}
\nEtc...
\nThe formatted string
\nPads the left side of a string with a specified character. This is especially useful\nfor normalizing number and date strings. Example usage:
\n\n var s = Ext.String.leftPad('123', 5, '0');\n // s now contains the string: '00123'\n
\n\nThe original string
\nThe total length of the output string
\nThe character with which to pad the original string (defaults to empty string \" \")
\nThe padded string
\nReturns a string with a specified number of repititions a given string pattern.\nThe pattern be separated by a different string.
\n\n var s = Ext.String.repeat('---', 4); // = '------------'\n var t = Ext.String.repeat('--', 3, '/'); // = '--/--/--'\n
\nResets the set of character entity definitions used by\nhtmlEncode and htmlDecode back to the\ndefault state.
\nUtility function that allows you to easily switch a string between two alternating values. The passed value\nis compared to the current string, and if they are equal, the other value that was passed in is returned. If\nthey are already different, the first value passed in is returned. Note that this method returns the new value\nbut does not change the current string.
\n\n // alternate sort directions\n sort = Ext.String.toggle(sort, 'ASC', 'DESC');\n\n // instead of conditional logic:\n sort = (sort == 'ASC' ? 'DESC' : 'ASC');\n
\n\nThe current string
\nThe value to compare to the current string
\nThe new value to use if the string already equals the first value passed in
\nThe new value
\nTrims whitespace from either end of a string, leaving spaces within the string intact. Example:\n@example
\n\nvar s = ' foo bar ';\nalert('-' + s + '-'); //alerts \"- foo bar -\"\nalert('-' + Ext.String.trim(s) + '-'); //alerts \"-foo bar-\"\n
\nThe string to escape
\nThe trimmed string
\n