In this guide, we will discuss the String split() Method in Dart Programming Language. Splits the string at matches of the specified delimiter and returns a list of substrings.
Syntax
split(Pattern pattern)
Parameters
- pattern − represents the delimiter.
Return Type
Returns a list of String objects.
Example
void main() { String str1 = "Today, is, Thursday"; print("New String: ${str1.split(',')}"); }
It will produce the following output −.
New String: [Today, is, Thursday]
Next Topic : Click Here
Pingback: String replaceAll() Method | Adglob Infosystem Pvt Ltd
Pingback: Dart Programming - String | Adglob Infosystem Pvt Ltd