String.Characters

From Xojo Documentation

Method

String.Characters() As Iterable

New in 2020r1

Supported for all project types and targets.

Allows you to iterate through the characters in a string.

Examples

This example is a function that takes a string (source) then returns the number of asterisks in it:

Var count As Integer
For Each char As String In source.Characters
if char = "*" then count = count + 1
Next
Return count