dequote 0.9.0

Remove nested quotes around text
Documentation
/*
dequote - Simple no-std text processing library
Written by Radim Kolar <hsn@sendmail.cz> 2024
https://gitlab.com/hsn10/dequote

This is free and unencumbered software released into the public domain.
For more information, please refer to <https://unlicense.org/>

CC0: This work has been marked as dedicated to the public domain.
For more information, please refer to <https://creativecommons.org/public-domain/cc0/>

SPDX-License-Identifier: Unlicense OR CC0-1.0
*/

#![forbid(unsafe_code)]

use super::{rtrim,ltrim,trim};

//     T   R   I   M      T E S T S

#[test]
/**
  Remove leading whitespace
*/
fn ltrim_whitespace() {
   assert_eq!( ltrim(&"\t  kavat"), "kavat" );
}

#[test]
fn no_ltrim_whitespace() {
   assert_eq!( ltrim(&"kavat"), "kavat" );
}

/**
  Remove trailing whitespace
*/
#[test]
fn rtrim_whitespace() {
   assert_eq!( rtrim(&"kavat   "), "kavat" );
}

#[test]
fn no_rtrim_whitespace() {
   assert_eq!( rtrim(&"kavat"), "kavat" );
}

/**
  Remove whitespace around text
*/
#[test]
fn trim_whitespace() {
   assert_eq!( trim(&"   kavat   "), "kavat" );
}

#[test]
fn no_trim_whitespace() {
   assert_eq!( trim(&"kavat"), "kavat" );
}