https://github.com/rodgeraraujo/reddish
A Rust utility library, making easier by taking the hassle out of working. :octocat:
https://github.com/rodgeraraujo/reddish
library reddish rust utilities utility utility-library
Last synced: 11 months ago
JSON representation
A Rust utility library, making easier by taking the hassle out of working. :octocat:
- Host: GitHub
- URL: https://github.com/rodgeraraujo/reddish
- Owner: rodgeraraujo
- License: mit
- Created: 2022-10-13T15:23:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-24T13:49:17.000Z (over 3 years ago)
- Last Synced: 2025-04-13T21:35:45.784Z (about 1 year ago)
- Topics: library, reddish, rust, utilities, utility, utility-library
- Language: Rust
- Homepage:
- Size: 43 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# reddish
[](https://crates.io/crates/reddish)
[](https://docs.rs/reddish/)
[](LICENSE)

A Rust utility library, making easier by taking the hassle out of working.
---
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
reddish = "0.2.0"
```
## Example
```rust
extern crate reddish;
use reddish::*;
fn main() {
println!("{}", snake_case("fooBarBaz"));
// foo_bar_baz
}
```
## Features
- [x] “String” Methods
- `.camel_case([string=''])`: Converts `string` to camel case.
- `.capitalize([string=''])`: Capitalize first char of `string`.
- `.kebab_case([string=''])`: Converts `string` to kebab case.
- `.snake_case([string=''])`: Converts `string` to snake case.
- `.title_case([string=''])`: Converts `string` to title case.
- `.pad([string=''], pad_length, pad_char=' ')`: Adds padding of length `pad_length` to both ends of `string` using optional `pad_char`, if no `pad_char` is supplied the `pad_char` defaults to ' '
- `.pad_end([string=''], pad_length, pad_char=' ')`: Adds padding of length `pad_length` to the end of `string` using optional `pad_char`, if no `pad_char` is supplied the `pad_char` defaults to ' '
- `.truncate([string=''], truncate_length)`: Truncates `string` to `truncate_length`.
- [x] “Array” Methods
- `.concat(vec: Vec, values: Vec)`: Creates a new array concatenating an array with any additional array values.
- `.difference(vec: Vec, values: Vec)`: Creates an array of values not included in the other given arrays using the same for equality comparisons.
- `.find_index(vec: Vec, find: F)`: Returns the index of the first found element.
- `.find_last_index(vec: Vec, find: F)`: Iterates over elements of collection from right to left, and returns the index of the found element.
- `.join(vec: Vec, sep: &str)`: Converts all elements in array into a string separated by separator.
- [ ] “Object” Methods
- TODO:
- [ ] “Collection” Methods
- TODO: