Partager via


XPath String Functions

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

String functions perform evaluations, format and manipulate string arguments, or convert an object to a string.

The following table shows the String functions implemented by XPath.

Function Description

concat Function

Returns the concatenation of the arguments.

contains Function

Returns True if the first argument string contains the second argument string; otherwise returns False.

normalize-space Function

Returns the argument string with the white space stripped.

starts-with Function

Returns True if the first argument string starts with the second argument string; otherwise returns False.

string Function (XML Query Language)

Converts an object to a string.

string-length Function

Returns the number of characters in the string.

substring Function

Returns the substring of the first argument starting at the position specified in the second argument and the length specified in the third argument.

substring-after Function

Returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string.

substring-before Function

Returns the substring of the first argument string that precedes the first occurrence of the second argument string in the first argument string.

translate Function

Returns the first argument string with occurrences of characters in the second argument string replaced by the character at the corresponding position in the third argument string.

See Also

Reference

XPath Functions