Name

starts-with( )

Synopsis

                     boolean starts-with(string s1, string s2)

The starts-with( ) function returns true if s1 starts with s2; otherwise, it is false. For example, starts-with("Charming cat", "Charm") is true, but starts-with ("Charming cat", "Marjorie") is false. The test is case-sensitive. For example, starts-with("Charming cat", "charm") is false. Nonstrings may be passed to this function as well, in which case they’re automatically converted to strings, as if by the string( ) function, before the test is made.

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.