Cappuccino  1.0.0
 All Classes Files Functions Variables Typedefs Macros Groups Pages
CPString.j File Reference

Go to the source code of this file.

Variables

 CPAnchoredSearch = 8
 
 CPBackwardsSearch = 4
 
global
CPInvalidArgumentException
global CPRangeException 
CPCaseInsensitiveSearch = 1
 
 CPDiacriticInsensitiveSearch = 128
 
 CPLiteralSearch = 2
 
 CPNumericSearch = 64
 
var CPStringNull = [CPNull null]
 
var CPStringRegexEscapeExpression = new RegExp("(\\" + CPStringRegexSpecialCharacters.join("|\\") + ")", 'g')
 
var CPStringRegexSpecialCharacters
 
var CPStringRegexTrimWhitespace = new RegExp("(^\\s+|\\s+$)", 'g')
 
var CPStringUIDs = new CFMutableDictionary()
 
var diacritics
 
String prototype isa = CPString
 
var normalized = [65,69,73,79,85,97,99,101,105,111,117]
 
String prototype stripDiacritics
 

Variable Documentation

CPAnchoredSearch = 8

Definition at line 46 of file CPString.j.

CPBackwardsSearch = 4

Start searching from the end of the string

Definition at line 42 of file CPString.j.

global CPInvalidArgumentException global CPRangeException CPCaseInsensitiveSearch = 1

A case insensitive search

Definition at line 32 of file CPString.j.

CPDiacriticInsensitiveSearch = 128

Search ignores diacritic marks.

Definition at line 56 of file CPString.j.

CPLiteralSearch = 2

Exact character match

Definition at line 37 of file CPString.j.

CPNumericSearch = 64

Numbers in the string are compared as numbers instead of strings

Definition at line 51 of file CPString.j.

var CPStringNull = [CPNull null]

Definition at line 494 of file CPString.j.

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

Definition at line 64 of file CPString.j.

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

Definition at line 60 of file CPString.j.

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

Definition at line 65 of file CPString.j.

var CPStringUIDs = new CFMutableDictionary()

Definition at line 58 of file CPString.j.

var diacritics
Initial value:
= [[192,198],[200,203],[204,207],[210,214],[217,220],[224,230],
[231,231],[232,235],[236,239],[242,246],[249,252]]

Definition at line 960 of file CPString.j.

String prototype isa = CPString

Definition at line 989 of file CPString.j.

var normalized = [65,69,73,79,85,97,99,101,105,111,117]

Definition at line 962 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 964 of file CPString.j.