C# Class LitDev.LDText

Afficher le fichier Open project: litdev1/LitDev

Méthodes publiques

Méthode Description
Compare ( Primitive text1, Primitive text2 ) : Primitive

Lexically compare 2 text strings, the comparison is case insensitive and culture invariant.

FindAll ( Primitive text, Primitive find ) : Primitive

Get all occurances of a subtext in some text.

GetHeight ( Primitive text ) : Primitive

Get the height in pixels that text will be displayed in the GraphicsWindow with the current font. The GraphicsWindow must be open to use this method.

GetWidth ( Primitive text ) : Primitive

Get the width in pixels that text will be displayed in the GraphicsWindow with the current font. The GraphicsWindow must be open to use this method.

Replace ( Primitive text, Primitive find, Primitive replace ) : Primitive

Find and Replace all occurances of one text with another.

Split ( Primitive text, Primitive separator ) : Primitive

Split a variable into an array delimiated by a separator.

Trim ( Primitive text ) : Primitive

Return a string with all leading and trailing 'white space' removed.

Method Details

Compare() public static méthode

Lexically compare 2 text strings, the comparison is case insensitive and culture invariant.
public static Compare ( Primitive text1, Primitive text2 ) : Primitive
text1 Primitive The first string to compare.
text2 Primitive The second string to compare.
Résultat Primitive

FindAll() public static méthode

Get all occurances of a subtext in some text.
public static FindAll ( Primitive text, Primitive find ) : Primitive
text Primitive The text to search.
find Primitive The subtext to search for.
Résultat Primitive

GetHeight() public static méthode

Get the height in pixels that text will be displayed in the GraphicsWindow with the current font. The GraphicsWindow must be open to use this method.
public static GetHeight ( Primitive text ) : Primitive
text Primitive The text to get the height.
Résultat Primitive

GetWidth() public static méthode

Get the width in pixels that text will be displayed in the GraphicsWindow with the current font. The GraphicsWindow must be open to use this method.
public static GetWidth ( Primitive text ) : Primitive
text Primitive The text to get the width.
Résultat Primitive

Replace() public static méthode

Find and Replace all occurances of one text with another.
public static Replace ( Primitive text, Primitive find, Primitive replace ) : Primitive
text Primitive A text to modify.
find Primitive The text to find and replace.
replace Primitive The text to replace the found text.
Résultat Primitive

Split() public static méthode

Split a variable into an array delimiated by a separator.
public static Split ( Primitive text, Primitive separator ) : Primitive
text Primitive A text string to split.
separator Primitive A separator string (e.g. " "), or an array of separator strings.
Résultat Primitive

Trim() public static méthode

Return a string with all leading and trailing 'white space' removed.
public static Trim ( Primitive text ) : Primitive
text Primitive A string to trim.
Résultat Primitive