# Strings | EasyNet Docs Source: https://easynet.run/docs/aal/strings # Strings Compose text, measure it and split it. Inside double-quoted strings, {expression} interpolates a value. This example splits comma-separated tags into a list and returns their count. ## Complete example Save the example as strings.aal strings.aal ``` agent Tutorial is Agent public ability run(text: String) -> String effects() tags = text.split(",") return "{tags.len()} tags: {text}" ``` [Download .aal](data:text/plain;charset=utf-8,agent%20Tutorial%20is%20Agent%0A%20%20public%0A%20%20%20%20ability%20run(text%3A%20String)%20-%3E%20String%20effects()%0A%20%20%20%20%20%20tags%20%3D%20text.split(%22%2C%22)%0A%20%20%20%20%20%20return%20%22%7Btags.len()%7D%20tags%3A%20%7Btext%7D%22%0A) ## Syntax explained Use {{ and }} for literal braces, \n for a newline and " for a double quote. .len() counts Unicode scalar values. Indexes start at 0; negative indexes are unsupported. .split(",") uses a literal separator, not a regular expression. The separator must be nonempty; empty fields are preserved. ## Build and run Terminal ``` cargo run --locked --bin aalc -- check strings.aal cargo run --locked --bin aalc -- build strings.aal -o strings.aalc cargo run --locked --bin aalc -- run strings.aalc \ --agent Tutorial --ability run \ --args '{"text":"docs,tools,agents"}' \ --state-dir .aal-tutorial/strings --invocation strings-1 ``` Run with a fresh state directory. The returned value is shown below; the CLI also prints execution information. Expected result ``` "3 tags: docs,tools,agents" ``` ## Try it yourself Set text to docs,tools, and run with a new invocation ID. The count remains 3 because the trailing empty field is preserved. [Language source and specification](https://github.com/Brain-Cell-Coding/Agent-Assembly-Language/blob/main/docs/language-v0.2.md)