Skip to content

Section 2.1.4. dropRightWhile is deprecated (Combining IO Actions) #267

@capistaincap

Description

@capistaincap

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions