Text value collection. Created by string literals or str(value), then read by length/index/loop operations.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
name = "Start"
if name:
first_char = name[0]
text(first_char)
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Related APIs
None
Methods
24 methods
String.literal
Creation Method
Create text directly with single or double quotes.
Syntax
"hello"
Parameters
Name
Description
textString
String content between quotes.
Required · Positional or named
No default
Returns
String — A new string value.
Behavior / side effects
Create text directly with single or double quotes.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "Start"
text(label)
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Convert a number, boolean, or other value to text.
Syntax
str(value, /)
Parameters
Name
Description
valueAny?
Value to convert into text.
Required · Positional only
No default
Returns
String — Converted text value.
Behavior / side effects
Convert a number, boolean, or other value to text. Large or deeply nested structured values use a bounded preview with explicit omission markers, while a direct string remains unchanged.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
attempt = 3
line = str(attempt)
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "Play"
count = len(label) # returns 4
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
String? — One-character string, or None if out of range.
Behavior / side effects
Read one character by index. Negative indexes count from the end.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "Play"
first = label[0] # returns 'P'
last = label[-1] # returns 'y'
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Distance between characters. Cannot be 0; negative values read backward.
Optional · Positional only
Default:1
Returns
String — A new string slice, clamped to the available range.
Behavior / side effects
Copy a substring using Python-style slicing. Omitted bounds use the start or end; negative indexes count from the end.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "PLAY"
text(label.lower())
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "play"
text(label.upper())
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Trim whitespace, or the provided characters, from both ends.
Syntax
string.strip(chars=None, /)
Parameters
Name
Description
charsString?
Characters to trim instead of whitespace.
Optional · Positional only
Default:None
Returns
String — Trimmed string.
Behavior / side effects
Trim whitespace, or the provided characters, from both ends.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = " Play "
clean = label.strip()
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Trim whitespace, or the provided characters, from the left side.
Syntax
string.lstrip(chars=None, /)
Parameters
Name
Description
charsString?
Characters to trim instead of whitespace.
Optional · Positional only
Default:None
Returns
String — Left-trimmed string.
Behavior / side effects
Trim whitespace, or the provided characters, from the left side.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "...Play"
clean = label.lstrip(".")
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Trim whitespace, or the provided characters, from the right side.
Syntax
string.rstrip(chars=None, /)
Parameters
Name
Description
charsString?
Characters to trim instead of whitespace.
Optional · Positional only
Default:None
Returns
String — Right-trimmed string.
Behavior / side effects
Trim whitespace, or the provided characters, from the right side.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "Play..."
clean = label.rstrip(".")
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Check whether the selected slice starts with a prefix.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "Play"
ready = label.startswith("Pl")
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Check whether the selected slice ends with a suffix.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "Play"
ready = label.endswith("ay")
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Find the first substring index, or return -1 when absent.
Syntax
string.find(sub, start=0, stop=len(string), /)
Parameters
Name
Description
subString
Substring to find.
Required · Positional only
No default
startInt
Start index for the search.
Optional · Positional only
Default:0
stopInt
Stop index for the search.
Optional · Positional only
Default:len(string)
Returns
Int — First matching index, or -1.
Behavior / side effects
Find the first substring index, or return -1 when absent.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "start button"
index = label.find("button")
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Find the first substring index and fail visibly when absent.
Syntax
string.index(sub, start=0, stop=len(string), /)
Parameters
Name
Description
subString
Substring that must exist.
Required · Positional only
No default
startInt
Start index for the search.
Optional · Positional only
Default:0
stopInt
Stop index for the search.
Optional · Positional only
Default:len(string)
Returns
Int — First matching index.
Behavior / side effects
Find the first substring index and fail visibly when absent.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "start button"
index = label.index("button")
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Return a copy with occurrences of old text replaced.
Syntax
string.replace(old, new, count=-1, /)
Parameters
Name
Description
oldString
Text to replace.
Required · Positional only
No default
newString
Replacement text.
Required · Positional only
No default
countInt
Maximum replacements; negative means all.
Optional · Positional only
Default:-1
Returns
String — Updated string copy.
Behavior / side effects
Return a copy with occurrences of old text replaced.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "start start"
once = label.replace("start", "play", 1)
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
raw = "a,b,c"
parts = raw.split(",")
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Join an iterable of strings using this string as the separator.
Syntax
string.join(iterable, /)
Parameters
Name
Description
iterableIterable<String>
String values to join.
Required · Positional only
No default
Returns
String — Joined string.
Behavior / side effects
Join an iterable of strings using this string as the separator.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
parts = ["a", "b", "c"]
line = ",".join(parts)
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "banana"
count = label.count("an")
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Check whether the string is non-empty and all characters are letters.
Syntax
string.isalpha()
Parameters
None
Returns
Boolean — true for letters only.
Behavior / side effects
Check whether the string is non-empty and all characters are letters.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
label = "Play"
ok = label.isalpha()
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Check whether the string is non-empty and all characters are digits.
Syntax
string.isdigit()
Parameters
None
Returns
Boolean — true for digits only.
Behavior / side effects
Check whether the string is non-empty and all characters are digits.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
value = "123"
ok = value.isdigit()
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Check whether the string is non-empty and all characters are letters or digits.
Syntax
string.isalnum()
Parameters
None
Returns
Boolean — true for letters or digits only.
Behavior / side effects
Check whether the string is non-empty and all characters are letters or digits.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
value = "A123"
ok = value.isalnum()
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Check whether the string is non-empty and all characters are whitespace.
Syntax
string.isspace()
Parameters
None
Returns
Boolean — true for whitespace only.
Behavior / side effects
Check whether the string is non-empty and all characters are whitespace.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
value = " "
ok = value.isspace()
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
None — No direct return value. Executes once per character.
Behavior / side effects
Iterate characters from left to right.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
word = "Go"
for ch in word:
text(ch)
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Boolean condition — true when non-empty, false when empty.
Behavior / side effects
Check whether the string is empty or not.
Execution
Blocking: No
Thread safety: Use separate objects per flow
Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
value = ""
if not value:
text("empty")
Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.