Skip to content

Add string manipulation functions (trim, to_upper, to_lower, starts_with, ends_with) #34

@davidgaspardev

Description

@davidgaspardev

Description

Add common string utility functions:

Function Description
trim(src, dst) Remove leading and trailing whitespace
to_upper(src, dst) Convert all characters to uppercase
to_lower(src, dst) Convert all characters to lowercase
starts_with(src, prefix) Check if string starts with prefix
ends_with(src, suffix) Check if string ends with suffix

References

  • Standard: ASCII character table (uppercase A-Z: 0x41–0x5A, lowercase a-z: 0x61–0x7A)
  • Standard C equivalents: toupper, tolower from <ctype.h> (locale-dependent)
  • Wikipedia: ASCII
  • Wikipedia: Trim (string)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions