best_utils_lib_ever 0.1.2

Best utility library/crate ever made!
Documentation
  • Coverage
  • 78.57%
    11 out of 14 items documented10 out of 10 items with examples
  • Size
  • Source code size: 8.47 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.43 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SimplyProgrammer

String Power (string_utils):

reverse(text: &str) -> String: Reverses a given string. to_uppercase(text: &str) -> String: Converts all lowercase letters to uppercase (and vice versa with to_lowercase). replace_all(text: &str, old_sub: &str, new_sub: &str) -> String: Replaces all occurrences of a substring with another. pub fn initcap(text: &str) -> String: Will return original string with first letter capitalized

String utils (string_utils):

read_file(path: &str) -> Result<String, String>: Reads file contents gracefully, handling errors. write_file(path: &str, content: &str) -> Result<(), String>: Writes text to a file, catching any issues. modification_time(path: &str) -> Result<Duration, Box>: Will return duration that describes last time the file with provided path was modified. Otherwise, respective error will be provided.

Data mastery ():

sort_data(data: &mut Vec, field: &str) -> Result<(), String>: Sorts a list based on a specified field (replace T with your data type). filter_data(data: &[T], predicate: fn(T) -> bool) -> Vec: Filters data based on a custom condition you define.