Skip to content

Missing core methods #23

@maximecb

Description

@maximecb

There are a few core methods that are currently missing but could improve the user-friendliness of Plush:

  • String.split(sep)
  • String.upper()
  • String.lower()
  • String.parse_float() // Try to parse the string as a decimal floating-point value
  • String.slice(start_idx, end_idx) // Indices in bytes, end_idx is not included
  • Array.slice(start_idx, end_idx) // returns a new sub-array, end_idx is not included
  • Array.resize(new_size, fill_value)
  • Int64.format_sep(sep_char)
    • Format an integer into a string with separators for thousands, millions, etc.
    • E.g. 1,000,000
    • This is useful for printing large numbers readably

Pull requests welcome. There are tests in the ./tests directory. Feel free to suggest other useful core methods that we could implement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions