Strings in bubblecode are enclosed in double quotes. bubblecode provides two concatenation operators and a rich set of built-in string functions.
Concatenation
| Operator | Effect | Example |
|---|---|---|
& | Join directly | "Hello" & "World" → HelloWorld |
&& | Join with a space | "Hello" && "World" → Hello World |
example.bubbleString functions
| Function | Description |
|---|---|
length(s) | Number of characters |
uppercase(s) | Convert to UPPERCASE |
lowercase(s) | Convert to lowercase |
reverse(s) | Reverse the string |
trim(s) | Strip leading/trailing spaces |
replace(s, old, new) | Replace occurrences |
example.bubbleContains check
The contains keyword tests whether one string appears inside another. It returns true or false.
example.bubbleThe quote constant
The built-in quote constant holds a double-quote character, useful for building strings that contain quotes.
example.bubble