In 2. Hello, World!, 2.1.4 (Combining IO Actions)
Deprecated function (dropRightWhile) usage:
let name := input.dropRightWhile Char.isWhitespace
Compiler output:
warning: String.dropRightWhile has been deprecated: Use String.dropEndWhile instead
Note: The direct replacement, String.dropEndWhile returns a string slice instead of a string (returned by dropRightWhile). Using it would require an additional .copy call, which may be confusing and a clarification may be needed.
In 2. Hello, World!, 2.1.4 (Combining IO Actions)
Deprecated function (dropRightWhile) usage:
let name := input.dropRightWhile Char.isWhitespaceCompiler output:
Note: The direct replacement,
String.dropEndWhilereturns a string slice instead of a string (returned bydropRightWhile). Using it would require an additional.copycall, which may be confusing and a clarification may be needed.