Home About Rice Downloads Documents Others Cooker CookerGX
Documents  >  Class  >  string  >  Split(string,bool)
string class : Split(string,bool) method

Description

Gets a list of the string that splits the invoker string by a specified string. You can specify whether the result includes empty string.

Syntax

stringInstance.Split(string splitter, bool includeEmpty)

Arguments

ClassNameDescription
stringsplitterString to split.
boolincludeEmptyValue that indicates whether the result includes the empty string.

Return value

ClassDescription
list{string}List of the substring that is splitted.

Sample code

//anyString is a instance of string type.

list{string} splitedStrings = anyString.Split("ww", false);

Notes

It's a wrapper of the System.String.Split(String[],StringSplitOptions).

Links for reference

Copyright © Rice All rights reserved.