A utility class with methods related to the String class.

### Hierarchy

- StringUtil

## Index

### Methods

- clean
- format
- trim
- trimEnd
- trimStart

## Methods

### Static clean

- clean(string: string): string

- - Defined in lib/starling/utils/StringUtil.d.ts:18

  Replaces a string's "master string" — the string it was built from — with a single character to save memory. Find more information about this AS3 oddity here.

  @param string The String to clean @return The input string, but with a master string only one character larger than it. @author Jackson Dunstan, JacksonDunstan.com

  #### Parameters

  - ##### string: string

  #### Returns string

### Static format

- format(format: string, args: Array<any>): string

- - Defined in lib/starling/utils/StringUtil.d.ts:8

  Formats a String in .Net-style, with curly braces ("{0}"). Does not support any number formatting options yet.

  #### Parameters

  - ##### format: string

  - ##### args: Array<any>

  #### Returns string

### Static trim

- trim(string: string): string

- - Defined in lib/starling/utils/StringUtil.d.ts:40

  Removes all leading and trailing white-space and control characters from the given String.

  Beware: this method does not make a proper Unicode white-space check, but simply trims all character codes of '0x20' or below.

  #### Parameters

  - ##### string: string

  #### Returns string

### Static trimEnd

- trimEnd(string: string): string

- - Defined in lib/starling/utils/StringUtil.d.ts:32

  Removes all trailing white-space and control characters from the given String.

  Beware: this method does not make a proper Unicode white-space check, but simply trims all character codes of '0x20' or below.

  #### Parameters

  - ##### string: string

  #### Returns string

### Static trimStart

- trimStart(string: string): string

- - Defined in lib/starling/utils/StringUtil.d.ts:25

  Removes all leading white-space and control characters from the given String.

  Beware: this method does not make a proper Unicode white-space check, but simply trims all character codes of '0x20' or below.

  #### Parameters

  - ##### string: string

  #### Returns string

Generated using TypeDoc