Export (0) Print
Expand All

String Type Extensions

.NET Framework 3.5

Provides extensions to the base ECMAScript (JavaScript) String object by including static and instance methods.

Namespace: None. This type extension is global and not part of a namespace.

Inherits: String

var stringVar = new String();

Name

Description

String.endsWith Function

Determines whether the end of the String object matches the specified string.

String.format Function

Replaces each format item in a String object with the text equivalent of a corresponding object's value.

String.localeFormat Function

Replaces the format items in a String object with the text equivalent of a corresponding object's value. The current culture is used to format dates and numbers.

String.startsWith Function

Determines whether the start of the String object matches the specified string.

String.trim Function

Removes leading and trailing white space from a String object instance.

String.trimEnd Function

Removes trailing white space from a String object instance.

String.trimStart Function

Removes leading white space from a String object instance.

String extensions are part of the Microsoft AJAX Library. They add functionality to the JavaScript String object and provide members that are more familiar to .NET programmers.

For more information about the JavaScript object that this type extends and about its constructor, see String Object in the Language Reference.

The following example shows how to create an instance of a String object and invoke the Microsoft AJAX Library String.format function to replace the format items in the String instance with new values.

Community Additions

ADD
Show:
© 2015 Microsoft