C# Class Jurassic.Library.StringInstance

Inheritance: ObjectInstance
Mostrar archivo Open project: paulbartrum/jurassic Class Usage Examples

Public Methods

Method Description
GetOwnPropertyDescriptor ( uint index ) : PropertyDescriptor

Gets a descriptor for the property with the given array index.

The prototype chain is not searched.

Replace ( string thisObject, RegExpInstance regExp, FunctionInstance replaceFunction ) : string

Returns a copy of this string with text replaced using a regular expression and a replacement function.

Replace ( string thisObject, RegExpInstance regExp, string replaceText ) : string

Returns a copy of this string with text replaced using a regular expression.

Replace ( string thisObject, string substr, FunctionInstance replaceFunction ) : string

Returns a copy of this string with text replaced using a replacement function.

Replace ( string thisObject, string substr, string replaceText ) : string

Returns a copy of this string with text replaced.

Split ( ScriptEngine engine, string thisObject, string separator, uint limit = uint.MaxValue ) : ArrayInstance

Splits this string into an array of strings by separating the string into substrings.

Split ( string thisObject, RegExpInstance regExp, uint limit = uint.MaxValue ) : ArrayInstance

Splits this string into an array of strings by separating the string into substrings.

StringInstance ( ObjectInstance prototype, string value ) : System

Creates a new string instance.

Private Methods

Method Description
Anchor ( string thisObject, string name ) : string
Big ( string thisObject ) : string
Blink ( string thisObject ) : string
Bold ( string thisObject ) : string
CharAt ( string thisObject, int index ) : string
CharCodeAt ( string thisObject, int index ) : double
CodePointAt ( string thisObject, int index ) : double
Concat ( ScriptEngine engine, object thisObject ) : ConcatenatedString
Contains ( string thisObject, string searchString, int position ) : bool
CreatePrototype ( ScriptEngine engine, StringConstructor constructor ) : ObjectInstance

Creates the string prototype object.

EndsWith ( ScriptEngine engine, string thisObject, object searchStringObj, int position = int.MaxValue ) : bool
Fixed ( string thisObject ) : string
FontColor ( string thisObject, string colorValue ) : string
FontSize ( string thisObject, string size ) : string
GetIterator ( ) : ObjectInstance
Includes ( ScriptEngine engine, string thisObject, object substring, int startIndex ) : bool
IndexOf ( string thisObject, string substring, int startIndex ) : int
Italics ( string thisObject ) : string
LastIndexOf ( string thisObject, string substring, double startIndex = double.NaN ) : int
Link ( string thisObject, string href ) : string
LocaleCompare ( string thisObject, string str ) : int
Match ( ScriptEngine engine, string thisObject, object substrOrRegExp ) : object
Normalize ( ScriptEngine engine, string thisObject, string form = "NFC" ) : string
Quote ( string thisObject ) : string
Repeat ( ScriptEngine engine, string thisObject, int count ) : string
Replace ( string thisObject, object substrOrRegExp, object replaceTextOrFunction ) : string
Search ( string thisObject, object substrOrRegExp ) : int
Slice ( string thisObject, int start, int end = int.MaxValue ) : string
Small ( string thisObject ) : string
Split ( ScriptEngine engine, string thisObject, object separator, double limit = uint.MaxValue ) : ArrayInstance
StartsWith ( ScriptEngine engine, string thisObject, object searchStringObj, int position ) : bool
Strike ( string thisObject ) : string
Sub ( string thisObject ) : string
Substr ( string thisObject, int start, int length = int.MaxValue ) : string
Substring ( string thisObject, int start, int end = int.MaxValue ) : string
Sup ( string thisObject ) : string
ToLocaleLowerCase ( string thisObject ) : string
ToLocaleUpperCase ( string thisObject ) : string
ToLowerCase ( string thisObject ) : string
ToString ( ) : string
ToUpperCase ( string thisObject ) : string
Trim ( string thisObject ) : string
TrimLeft ( string thisObject ) : string
TrimRight ( string thisObject ) : string
ValueOf ( ) : string

Method Details

GetOwnPropertyDescriptor() public method

Gets a descriptor for the property with the given array index.
The prototype chain is not searched.
public GetOwnPropertyDescriptor ( uint index ) : PropertyDescriptor
index uint The array index of the property.
return PropertyDescriptor

Replace() public static method

Returns a copy of this string with text replaced using a regular expression and a replacement function.
public static Replace ( string thisObject, RegExpInstance regExp, FunctionInstance replaceFunction ) : string
thisObject string The string that is being operated on.
regExp RegExpInstance The regular expression to search for.
replaceFunction FunctionInstance A function that is called to produce the text to replace /// for every successful match.
return string

Replace() public static method

Returns a copy of this string with text replaced using a regular expression.
public static Replace ( string thisObject, RegExpInstance regExp, string replaceText ) : string
thisObject string The string that is being operated on.
regExp RegExpInstance The regular expression to search for.
replaceText string A string containing the text to replace for every successful match.
return string

Replace() public static method

Returns a copy of this string with text replaced using a replacement function.
public static Replace ( string thisObject, string substr, FunctionInstance replaceFunction ) : string
thisObject string The string that is being operated on.
substr string The text to search for.
replaceFunction FunctionInstance A function that is called to produce the text to replace /// for every successful match.
return string

Replace() public static method

Returns a copy of this string with text replaced.
public static Replace ( string thisObject, string substr, string replaceText ) : string
thisObject string The string that is being operated on.
substr string The text to search for.
replaceText string A string containing the text to replace for every successful /// match.
return string

Split() public static method

Splits this string into an array of strings by separating the string into substrings.
public static Split ( ScriptEngine engine, string thisObject, string separator, uint limit = uint.MaxValue ) : ArrayInstance
engine ScriptEngine The current script environment.
thisObject string The string that is being operated on.
separator string A string that indicates where to split the string.
limit uint The maximum number of array items to return. Defaults to unlimited.
return ArrayInstance

Split() public static method

Splits this string into an array of strings by separating the string into substrings.
public static Split ( string thisObject, RegExpInstance regExp, uint limit = uint.MaxValue ) : ArrayInstance
thisObject string The string that is being operated on.
regExp RegExpInstance A regular expression that indicates where to split the string.
limit uint The maximum number of array items to return. Defaults to unlimited.
return ArrayInstance

StringInstance() public method

Creates a new string instance.
public StringInstance ( ObjectInstance prototype, string value ) : System
prototype ObjectInstance The next object in the prototype chain.
value string The value to initialize the instance.
return System