API  1.0.0
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

CPAnchoredSearch = 8

Definition at line 46 of file CPString.j.

◆ CPBackwardsSearch

CPBackwardsSearch = 4

Start searching from the end of the string

Definition at line 42 of file CPString.j.

◆ CPCaseInsensitiveSearch

global CPInvalidArgumentException global CPRangeException CPCaseInsensitiveSearch = 1

A case insensitive search

Definition at line 32 of file CPString.j.

◆ CPDiacriticInsensitiveSearch

CPDiacriticInsensitiveSearch = 128

Search ignores diacritic marks.

Definition at line 56 of file CPString.j.

◆ CPLiteralSearch

CPLiteralSearch = 2

Exact character match

Definition at line 37 of file CPString.j.

◆ CPNumericSearch

CPNumericSearch = 64

Numbers in the string are compared as numbers instead of strings

Definition at line 51 of file CPString.j.

◆ CPStringNull

var CPStringNull = [CPNull null]

Definition at line 494 of file CPString.j.

◆ CPStringRegexEscapeExpression

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

Definition at line 64 of file CPString.j.

◆ CPStringRegexSpecialCharacters

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

Definition at line 60 of file CPString.j.

◆ CPStringRegexTrimWhitespace

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

Definition at line 65 of file CPString.j.

◆ CPStringUIDs

var CPStringUIDs = new CFMutableDictionary()

Definition at line 58 of file CPString.j.

◆ diacritics

var diacritics =

Definition at line 960 of file CPString.j.

◆ isa

String prototype isa = CPString

Definition at line 989 of file CPString.j.

◆ normalized

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

Definition at line 962 of file CPString.j.

◆ stripDiacritics

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;
}
var diacritics
Definition: CPString.j:960
var normalized
Definition: CPString.j:962

Definition at line 964 of file CPString.j.