stringSplit := string_split(Args{text: "a,b,c", separator: ","})
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "String 1: " + stringSplit.string_1,
})
String Split List
BlockStrings
Split a string into a list of strings with a delimiter.
Inputs
StringRequired
String to split.
Example: a,b,c
SeparatorRequired
Delimiter to split on.
Example: ,
Sort
Order of the results.
OptionsNormalReverseRandomAlphabeticalReverse AlphabeticalAscending NumericDescending Numeric
Max Parts
Number of parts (1-20) to put in the String outputs. Remaining parts are outputted as Rest. Leave blank for 20.
Example: 1
Outputs
String 1
Split result.
String 2
Split result.
String 3
Split result.
String 4
Split result.
String 5
Split result.
String 6
Split result.
String 7
Split result.
String 8
Split result.
String 9
Split result.
String 10
Split result.
String 11
Split result.
String 12
Split result.
String 13
Split result.
String 14
Split result.
String 15
Split result.
String 16
Split result.
String 17
Split result.
String 18
Split result.
String 19
Split result.
String 20
Split result.
Rest
Remaining text after Max Parts are processed.
Example: b,c
Build a bot using blocks like String Split List
Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
ID:
string_splitInputs
| Field | InventScript name | Value |
|---|---|---|
| String | text | e.g. "a,b,c" |
| Separator | separator | e.g. "," |
| Sort | sort | "Normal", "Reverse", "Random", "Alphabetical", "Reverse Alphabetical", "Ascending Numeric", "Descending Numeric" |
| Max Parts | max_parts | e.g. "1" |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| String 1 | string_1 | |
| String 2 | string_2 | |
| String 3 | string_3 | |
| String 4 | string_4 | |
| String 5 | string_5 | |
| String 6 | string_6 | |
| String 7 | string_7 | |
| String 8 | string_8 | |
| String 9 | string_9 | |
| String 10 | string_10 | |
| String 11 | string_11 | |
| String 12 | string_12 | |
| String 13 | string_13 | |
| String 14 | string_14 | |
| String 15 | string_15 | |
| String 16 | string_16 | |
| String 17 | string_17 | |
| String 18 | string_18 | |
| String 19 | string_19 | |
| String 20 | string_20 | |
| Rest | rest | e.g. "b,c" |
Example InventScript
More strings blocks
String LengthGet the length of a string in characters and in bytes.Split String IteratorIterate over a string separated by a delimiter.String Contains CountCount the number of times a substring appears in a string.String ReplaceReplace a substring with a new substring within a string.String to LowercaseConvert a string to lowercase.String to UppercaseConvert a string to uppercase.String Trim PrefixRemove a prefix from a string.String Trim SuffixRemove a suffix from a string.Truncate StringTruncate a string to a certain length.Base64 EncodeEncode a string to Base64.Base64 DecodeDecode a Base64 string.Format NumberFormat a number with commas.Generate UUIDv4Generate a UUIDv4 (fully-random).Generate UUIDv7Generate a UUIDv7 (time-based).Parse ColorParse a color string (name or hex code) into a hex string.URL Query EscapeEncode a string to be used as a URL parameter.URL Query UnescapeDecode a string used as a URL parameter.Bcrypt Hash StringApply a one-way hash to a string using bcrypt.Bcrypt Compare HashCompare a string to a bcrypt hash.Verify HMACVerify a message against an HMAC signature.MD5 HashGenerate an MD5 hash of a string.Sort Lines by Number Prefix or SuffixSort lines of text by the number at the beginning or end of each line.Truncate Split String ListSplit a string into groups of a certain number of characters.Truncate Split String IteratorIterate over a string by groups of a certain number of characters.Scramble StringScramble the order of characters in a string.Random String GeneratorGenerate a random string of a specified length using a chosen character set.Repeat StringRepeat a string a specified number of times.Reverse StringReverse the characters of a string.Reorder Comma Separated ListReorder the elements in a comma separated list.Intersection of Comma Separated ListsCompare two comma separated lists and find items exclusive to each list and items common to both.Remap StringRemap or replace values in a string using a set of original-to-replacement pairs.Get UUIDv7 Creation TimeGet the creation time of a UUIDv7.