enumerateLines(_:)
Enumerates all the lines in the string.
Declaration
func enumerateLines(_ block: @escaping (String, UnsafeMutablePointer<ObjCBool>) -> Void)Parameters
- block:
The block executed for the enumeration.
The block takes two arguments:
- line
The current line of the string being enumerated. The line contains just the contents of the line, without the line terminators. See Getlinestart(_:end:contentsend:for:) for a discussion of line terminators.
- stop
A reference to a Boolean value that the block can use to stop the enumeration by setting
*stop = YES; it should not touch*stopotherwise.
See Also
Finding Characters and Substrings
contains(_:)localizedCaseInsensitiveContains(_:)localizedStandardContains(_:)rangeOfCharacter(from:)rangeOfCharacter(from:options:)rangeOfCharacter(from:options:range:)range(of:)range(of:options:)range(of:options:range:)range(of:options:range:locale:)localizedStandardRange(of:)enumerateSubstrings(in:options:using:)