Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. XML
  3. EXSLT
  4. Reference
  5. Strings (str)
  6. str:split()

str:split()

str:split() splits a string using a pattern string to determine where the splits should occur, returning a node-set containing the resulting strings.

Syntax

str:split(string, pattern)

Parameters

string

The string to split.

pattern

The pattern indicating where to split the string.

Return value

A node-set oftoken elements, each containing one token from thestring.

Example

str:split('book, phone, computer, chair', ', ')

Returns a node set like:

xml
<token>book</token><token>phone</token><token>computer</token><token>chair</token>

Specifications

EXSLT - STR:SPLIT

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp