Skip to content

[FEAT]: Add the string category from lodash into this package #17

Description

@ImBIOS

Clear and concise description of the problem

The current implementation of Lorust lacks utility functions related to string manipulation. This omission limits the library's usability for string processing tasks, common in many software projects.

Suggested solution

  1. Create a new module named string under the src directory.
  2. Implement the most frequently used lodash string utility functions within this module, such as:
    • camelCase
    • capitalize
    • endsWith
    • startsWith
    • trim
    • toLower
    • toUpper
  3. Add comprehensive unit tests for each function to ensure correctness.
  4. Update the README file to indicate that the string category is now supported, and perhaps include a few code examples.

Code Example:

// src/string/mod.rs
pub fn camel_case(s: &str) -> String {
    // implementation here
}

pub fn capitalize(s: &str) -> String {
    // implementation here
}
// ... more functions

Alternative

A phased approach could be adopted, where the functions are implemented and released in smaller groups. This would allow for quicker initial releases and can be prioritized based on community feedback or the most common use cases.

Additional context

Adding a string module with utility functions similar to those in lodash's string category would enhance Lorust's overall functionality. This addition would make the library more appealing to Rust developers who have tasks related to string manipulation and may result in increased adoption of Lorust.

Validations

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions