A Rust utility library, making easier by taking the hassle out of working. :octocat:

Overview

reddish

Crates.io Documentation License

reddish library logo

A Rust utility library, making easier by taking the hassle out of working.


Usage

Add this to your Cargo.toml:

[dependencies]
reddish = "0.2.0"

Example

extern crate reddish;
use reddish::*;

fn main() {
  println!("{}", snake_case("fooBarBaz"));
  // foo_bar_baz
}

Features

  • “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.
  • “Array” Methods

    • .concat(vec: Vec<T>, values: Vec<T>): Creates a new array concatenating an array with any additional array values.
    • .difference(vec: Vec<T>, values: Vec<T>): Creates an array of values not included in the other given arrays using the same for equality comparisons.
    • .find_index(vec: Vec<T>, find: F): Returns the index of the first found element.
    • .find_last_index(vec: Vec<T>, find: F): Iterates over elements of collection from right to left, and returns the index of the found element.
    • .join(vec: Vec<T>, sep: &str): Converts all elements in array into a string separated by separator.
  • “Object” Methods

    • TODO:
  • “Collection” Methods

    • TODO:
You might also like...
Utilities to gather data out of roms. Written in Rust. It (should) support all types.

snesutilities Utilities to gather data out of roms. Written in Rust. It (should) support all types. How Have a look at main.rs: use snesutilities::Sne

This crate allows writing a struct in Rust and have it derive a struct of arrays layed out in memory according to the arrow format.

Arrow2-derive - derive for Arrow2 This crate allows writing a struct in Rust and have it derive a struct of arrays layed out in memory according to th

Spot coupling by finding out which files are always in the same commit

git moves-together This tells you when files in the repository frequently move together. This lets you identify where the coupling is in the system. C

bustd is a lightweight process killer daemon for out-of-memory scenarios for Linux!

bustd: Available memory or bust! bustd is a lightweight process killer daemon for out-of-memory scenarios for Linux! Features Small memory usage! bust

A simple string parsing utility library for Rust, supporting no_std contexts.

strp Utility library for parsing data from an input string, or stdin if built with the std feature. Supports no_std contexts when built without the st

⏲ Situwaition is a Rust utility library that waits for conditions

⏲ situwaition situwaition runs a closure continuously, until an Ok(..) is received, or a timeout period elapses. Install cargo add situwaition

Utility library to work with tuples.

Utility library to work with tuples.

ᎩᎦᎨᎢ (IPA: [gigagei]) is a random quote fetching console utility. Written in Rust.
ᎩᎦᎨᎢ (IPA: [gigagei]) is a random quote fetching console utility. Written in Rust.

gigagei ᎩᎦᎨᎢ (IPA: [gigagei]) is a random quote fetching console utility. Written in Rust. Installing Use latest pre-built binary from releases Buildi

A fast, multi-threaded line counting utility written in Rust.

xloc A fast, multi-threaded line counting utility written in Rust. What is xloc A drop in replacement for bash's wc -l. Your project has x lines of co

Comments
  • feat: added doc strings and tests

    feat: added doc strings and tests

    Resolves #1

    Added doc strings and tests to all current methods.

    It appears that both capitalize and title_case both do the same thing essentially, is this intentional?

    hacktoberfest hacktoberfest-accepted 
    opened by gybrish 2
  • feat: implemented pad, pad_end and truncate methods for strings

    feat: implemented pad, pad_end and truncate methods for strings

    closes rodgeraraujo/reddish#5

    I took some liberty with the pad methods, let me know if you want them implemented differently, or want any other changes for that matter :)

    hacktoberfest hacktoberfest-accepted 
    opened by gybrish 2
Releases(v0.2.0)
  • v0.2.0(Oct 20, 2022)

    Features in this version:

    • [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<T>, values: Vec<T>): Creates a new array concatenating an array with any additional array values.
      • .difference(vec: Vec<T>, values: Vec<T>): Creates an array of values not included in the other given arrays using the same for equality comparisons.
      • .find_index(vec: Vec<T>, find: F): Returns the index of the first found element.
      • .find_last_index(vec: Vec<T>, find: F): Iterates over elements of collection from right to left, and returns the index of the found element.
      • .join(vec: Vec<T>, sep: &str): Converts all elements in array into a string separated by separator.
    Source code(tar.gz)
    Source code(zip)
Owner
Rogério Araújo
I make things. | Software Engineer
Rogério Araújo
Bolt is a desktop application that is designed to make the process of developing and testing APIs easier and more efficient.

Bolt ⚡ Bolt is a desktop application that is designed to make the process of developing and testing APIs easier and more efficient. Quick start ??‍??

0xHiro 6 Mar 26, 2023
A simple wrapper for the detour-rs library that makes making hooks much more concise

A simple wrapper for the detour-rs library that makes making hooks much more concise

Khangaroo 6 Jun 21, 2022
Rust crate for making Read streams peekable.

peekread This crate allows you to take an arbitrary Read stream and 'peek ahead' into the stream without consuming the original stream. This is done t

Orson Peters 21 Oct 29, 2022
🦸‍♂️ Recast migrates your old extensions to AndroidX, making them compatible with the latest version of Kodular.

Recast Recast helps make your old extensions compatible with Kodular Creator version 1.5.0 or above. Prerequisites To use Recast, you need to have Jav

Shreyash Saitwal 13 Dec 28, 2022
A working example of multi targets compilation for Rust using Github Actions.

A working example of multi targets compilation for Rust using Github Actions. Supports Windows, MacOSX, x86_64, ARM and Raspberry PI Linux.

Nicolas Vanhoren 41 Dec 17, 2022
IDX is a Rust crate for working with RuneScape .idx-format caches.

This image proudly made in GIMP License Licensed under GNU GPL, Version 3.0, (LICENSE-GPL3 or https://choosealicense.com/licenses/gpl-3.0/) Contributi

Ceikry 5 May 27, 2022
Rust libraries for working with GPT (GUID Partition Table) disk data

gpt-disk-rs no_std libraries related to GPT (GUID Partition Table) disk data. There are three Rust packages in this repository: uguid The uguid packag

Google 25 Dec 24, 2022
Toolkit for working with scripts used by REDengine in Cyberpunk 2077.

redscript Toolkit for working with scripts used by REDengine in Cyberpunk 2077. Currently includes a compiler, a decompiler and a disassembler. usage

jac3km4 268 Jan 6, 2023
Estimate the amount of time spent working on a Git repository

jikyuu (時給) A tool to estimate the amount of time spent working on a Git repository. It is a direct port of git-hours, written in Node.js, because the

null 18 Nov 16, 2022
Cargo wrapper for working with Webassembly wasi(x).

cargo-wasix A cargo subcommand that wraps regular cargo commands for compiling Rust code to wasix, a superset of Websassembly wasi with additional fun

WASIX 19 Jun 12, 2023