API  0.9.6
 All Classes Files Functions Variables Macros Groups Pages
CPString.j File Reference

Go to the source code of this file.

Variables

 CPAnchoredSearch = 8
 
 CPBackwardsSearch = 4
 
 CPCaseInsensitiveSearch = 1
 
 CPDiacriticInsensitiveSearch = 128
 
 CPLiteralSearch = 2
 
 CPNumericSearch = 64
 
var CPStringRegexEscapeExpression = new RegExp("(\\" + CPStringRegexSpecialCharacters.join("|\\") + ")", 'g')
 
var CPStringRegexSpecialCharacters
 
var CPStringRegexTrimWhitespace = new RegExp("(^\\s+|\\s+$)", 'g')
 
var CPStringUIDs = new CFMutableDictionary()
 
var diacritics = [[192,198],[224,230],[231,231],[232,235],[236,239],[242,246],[249,252]]
 
String prototype isa = CPString
 
var normalized = [65,97,99,101,105,111,117]
 
String prototype stripDiacritics
 

Variable Documentation

CPAnchoredSearch = 8

Definition at line 48 of file CPString.j.

CPBackwardsSearch = 4

Definition at line 43 of file CPString.j.

CPCaseInsensitiveSearch = 1

Definition at line 31 of file CPString.j.

CPDiacriticInsensitiveSearch = 128

Definition at line 60 of file CPString.j.

CPLiteralSearch = 2

Definition at line 37 of file CPString.j.

CPNumericSearch = 64

Definition at line 54 of file CPString.j.

var CPStringRegexEscapeExpression = new RegExp("(\\" + CPStringRegexSpecialCharacters.join("|\\") + ")", 'g')

Definition at line 68 of file CPString.j.

var CPStringRegexSpecialCharacters
Initial value:
= [
'/', '.', '*', '+', '?', '|', '$', '^',
'(', ')', '[', ']', '{', '}', '\\'
]

Definition at line 64 of file CPString.j.

var CPStringRegexTrimWhitespace = new RegExp("(^\\s+|\\s+$)", 'g')

Definition at line 69 of file CPString.j.

var CPStringUIDs = new CFMutableDictionary()

Definition at line 62 of file CPString.j.

var diacritics = [[192,198],[224,230],[231,231],[232,235],[236,239],[242,246],[249,252]]

Definition at line 934 of file CPString.j.

String prototype isa = CPString

Definition at line 962 of file CPString.j.

var normalized = [65,97,99,101,105,111,117]

Definition at line 935 of file CPString.j.

String prototype stripDiacritics
Initial value:
= function()
{
var output = "";
for (var indexSource = 0; indexSource < this.length; indexSource++)
{
var code = this.charCodeAt(indexSource);
for (var i = 0; i < diacritics.length; i++)
{
var drange = diacritics[i];
if (code >= drange[0] && code <= drange[drange.length - 1])
{
code = normalized[i];
break;
}
}
output += String.fromCharCode(code);
}
return output;
}

Definition at line 937 of file CPString.j.