Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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