String Methods
Methods use value.method(...). String length and indexing operate on bytes, not Unicode grapheme clusters. find/index is a literal search; match is the regex operation.
axon
| Method | Behavior |
|---|---|
upper(), lower() | Case conversion. |
strip()/trim(), lstrip(), rstrip() | Whitespace trimming. |
length()/len()/size() | Byte length. |
contains()/includes(), startswith(), endswith() | Literal containment or prefix/suffix tests. |
find()/index() | Zero-based literal match position, or -1. |
match(pattern), find_all(pattern) | First regex match string/null, or list of matches. |
test()/matches() | Regex search boolean. |
replace(pattern, replacement), split(pattern) | Regex replacement/splitting with existing literal fallbacks. |
sub(pattern, replacement, count) | Limited replacement count. |
repeat(n), isempty()/empty() | Repetition and empty check. |
toint(), tofloat() | Numeric conversion; validate source data deliberately. |
Regex syntax is ECMAScript. Invalid-pattern handling is not uniform: match may return null, test false, and replace/split may use literal fallbacks. String .tostr() is not a supported conversion method.
String Index Access
axon
Number Methods
axon
abs(), floor(), ceil(), round(), tostr()/str() operate on numeric values. Axon has one number type, stored as a double.
List Methods
axon
| Method | Behavior |
|---|---|
append(value) | Append to the list variable. |
pop() | Remove and return the final value; empty list returns null. |
first(), last() | Read an endpoint; empty list returns null. |
size()/length()/len() | Item count. |
contains()/includes() | Membership test. |
join(separator) | Join string representations. |
reverse() | Return values in reverse order. |
isempty()/empty() | Empty-list check. |
Dictionary and List Assignment
Use bracket access for keys and positions. Missing dictionary keys return null under current lookup semantics. Define a dictionary root before creating nested fields.
axon