|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--PTStringUtil
Static class containing String utility methods.
Usage:
PTStringUtil.trimWhitespace(str)
| Field Summary | |
<static> Object |
VERSION
|
| Constructor Summary | |
PTStringUtil
()
PTStringUtil static object constructor |
|
| Method Summary | |
<static> Boolean
|
containsAngleBrackets(str)
Determines if a string contains angle brackets |
<static> Boolean
|
containsWhitespace(str)
Determines if a string contains whitespace |
<static> String
|
encodeURL(str,URLEncodeSingleQuotes)
Escapes a string for safe usage as a URL |
<static> String
|
escapeHTML(str,doLineBreakConversion,doWhitespaceConversion)
Escapes a string for safe display within HTML |
<static> String
|
escapeJS(str)
Escapes a string for safe usage within JavaScript |
<static> String
|
getInnerText(elem)
Retrieves the "innerText" from an element |
<static> Boolean
|
isAllWhitespace(str)
Determines if a string contains only whitespace |
<static> Boolean
|
isString(obj)
Determines if an object is a string |
<static> Boolean
|
isValidHTTPString(str)
Determines if an object is a valid HTTP string |
<static> Boolean
|
isValidUNCString(str, bCanBeNull)
Determines if an object is a valid UNC string |
<static> String
|
removeHTML(str)
Removes HTML from a string of HTML. |
<static> String
|
stripChars(str,chars)
Removes all occurences of a list of characters from a string |
<static> String
|
trimWhitespace(str,trimFront,trimRear)
Removes whitespace from the beginning and/or end of a string |
<static> String
|
UCFirst(str)
Converts first letter of a string to upper case |
<static> String
|
unescapeHTML(str)
Unescapes an escaped string for use as HTML |
| Field Detail |
<static> Object VERSION
| Constructor Detail |
PTStringUtil()
| Method Detail |
<static> Boolean containsAngleBrackets(str)
str - String to test
<static> Boolean containsWhitespace(str)
str - String to test
<static> String encodeURL(str,URLEncodeSingleQuotes)
str - String to escape (string)
URLEncodeSingleQuotes - Whether or not to also URL encode single quotes (boolean)
<static> String escapeHTML(str,doLineBreakConversion,doWhitespaceConversion)
str - String to escape (string)
doLineBreakConversion - (boolean)
doWhitespaceConversion - (boolean)
<static> String escapeJS(str)
str - String to escape (string)
<static> String getInnerText(elem)
elem - Element to retrieve innerText from (HTMLElement)
<static> Boolean isAllWhitespace(str)
str - String to test
<static> Boolean isString(obj)
obj - Object to test
<static> Boolean isValidHTTPString(str)
str - String to test
<static> Boolean isValidUNCString(str, bCanBeNull)
str - String to test
bCanBeNull - Whether or not to allow null strings
<static> String removeHTML(str)
str - String to remove html from (string)
<static> String stripChars(str,chars)
str - String to strip (string)
chars - Array of characters to remove (Array)
<static> String trimWhitespace(str,trimFront,trimRear)
str - String to trim (string)
trimFront - Option to remove whitespace from front of string (boolean)
trimRear - Option to remove whitespace from tail of string (boolean)
<static> String UCFirst(str)
str - String to convert (string)
<static> String unescapeHTML(str)
str - String to escape (string)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||