From Xojo Documentation

Revision as of 06:04, 5 October 2020 by RobinLM (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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