Class AjxStringUtil

Object
   |
   +--AjxStringUtil

class AjxStringUtil


This class provides static methods to perform miscellaneous string-related utility functions.
Defined in AjxStringUtil.js

Author: Ross Dargahi , Roland Schemers , Conrad Damon


Field Summary
<static>  Object _INDENT
          
<static>  Object _LF
          
<static>  Object _NO_LIST
          Converts a HTML document represented by a DOM tree to text
<static>  Object _NON_WHITESPACE
          
<static>  Object _ORDERED_LIST
          
<static>  Object _UNORDERED_LIST
          
<static>  Object BLANK_RE
          
<static>  Object BRACKET_RE
          
<static>  Object COLON_RE
          
<static>  Object COMPRESS_RE
          
<static>  Object ELLIPSIS
          
<static>  Object ENCODE_MAP
          HTML-encodes a string.
<static>  Object HDR_RE
          
<static>  Object IS_PRINT_CODE
          Returns true if the character for the given key is considered printable.
<static>  Object LINE_RE
          
<static>  Object MSG_SEP_RE
          
<static>  Object PREFIX_RE
          
<static>  Object SHIFT_CHAR
          Returns the character for the given key, taking the shift key into consideration.
<static>  Object SIG_RE
          
<static>  Object SPACE_ENCODE_MAP
          HTML-encodes a string.
<static>  Object TRIM_RE
          Removes white space from the beginning and end of a string, optionally compressing internal white space.
 
Constructor Summary
AjxStringUtil ()
            Does nothing (static class).
 
Method Summary
<static> Object _linesToSkip(lines, i)
          
<static> Object _nextNonBlankLineIndex(lines, i)
          
<static> Object _traverse(el, text, idx, listType, listLevel, bulletNum, ctxt)
          
<static> Object _trimBlankLines(text, eol)
          
<static> Object calcDIV()
          
<static> Object clip(origString, pixelWidth, className)
           Clips a string at "pixelWidth" using using "className" on hidden 'AjxStringUtil._calcDIV'.
<static> Object convertHtml2Text(domRoot)
          
<static> Object convertToHtml(str)
          
<static> Object diffPoint(str1, str2)
           Does a diff between two strings, returning the index of the first differing character.
<static> Object getTopLevel(text, eol)
           Returns a list of chunks of top-level content in a message body.
<static> Object getUnitsFromSizeString(sizeString)
          
<static> Object htmlEncode(str, includeSpaces)
          
<static> Object htmlEncodeSpace(str)
          
<static> Object isPrintKey(keycode)
          
<static> Object makeString(val)
          
<static> Object nl2br(str)
          
<static> Object regExEscape(str)
          
<static> Object repeat(str, num)
           Returns the string repeated the given number of times.
<static> Object resolve(str, values)
           DEPRECATED
<static> Object shiftChar(keycode, shifted)
          
<static> Object split(str, dels)
           Splits a string, ignoring delimiters that are in quotes or parentheses.
<static> Object trim(str, compress, space)
          
<static> Object urlEncode(str)
           URL-encodes a string.
<static> Object wordWrap(text, len, pre, eol, breakOkay, compress)
           Wraps text to the given length and quotes it, breaking on space when possible.
<static> Object wrap(origString, pixelWidth, className)
           Forces a string to wrap at "pixelWidth" using "className" on hidden 'AjxStringUtil._calcDIV'.
<static> Object xmlAttrDecode(str)
          
<static> Object xmlAttrEncode(str)
          
<static> Object xmlDecode(str)
          
<static> Object xmlEncode(str)
          

Field Detail

_INDENT

<static> Object _INDENT

_LF

<static> Object _LF

_NO_LIST

<static> Object _NO_LIST

_NON_WHITESPACE

<static> Object _NON_WHITESPACE

_ORDERED_LIST

<static> Object _ORDERED_LIST

_UNORDERED_LIST

<static> Object _UNORDERED_LIST

BLANK_RE

<static> Object BLANK_RE

BRACKET_RE

<static> Object BRACKET_RE

COLON_RE

<static> Object COLON_RE

COMPRESS_RE

<static> Object COMPRESS_RE

ELLIPSIS

<static> Object ELLIPSIS

ENCODE_MAP

<static> Object ENCODE_MAP

HDR_RE

<static> Object HDR_RE

IS_PRINT_CODE

<static> Object IS_PRINT_CODE

LINE_RE

<static> Object LINE_RE

MSG_SEP_RE

<static> Object MSG_SEP_RE

PREFIX_RE

<static> Object PREFIX_RE

SHIFT_CHAR

<static> Object SHIFT_CHAR

SIG_RE

<static> Object SIG_RE

SPACE_ENCODE_MAP

<static> Object SPACE_ENCODE_MAP

TRIM_RE

<static> Object TRIM_RE

Constructor Detail

AjxStringUtil

AjxStringUtil()

Method Detail

_linesToSkip

<static> Object _linesToSkip(lines, i)

_nextNonBlankLineIndex

<static> Object _nextNonBlankLineIndex(lines, i)

_traverse

<static> Object _traverse(el, text, idx, listType, listLevel, bulletNum, ctxt)

_trimBlankLines

<static> Object _trimBlankLines(text, eol)

calcDIV

<static> Object calcDIV()

clip

<static> Object clip(origString, pixelWidth, className)

convertHtml2Text

<static> Object convertHtml2Text(domRoot)

convertToHtml

<static> Object convertToHtml(str)

diffPoint

<static> Object diffPoint(str1, str2)

getTopLevel

<static> Object getTopLevel(text, eol)