From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

String.Characters() As Iterable

New in 2020r1

Supported for all project types and targets.

Allows you to iterate through the characters in a string.


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
Return count