Crate wstring_tools

Source
Expand description

Tools to manipulate strings.

§Module :: wstring_tools

experimental rust-status docs.rs discord

Tools to manipulate strings.

§Sample

#[ cfg( all( feature = "split", feature = "use_std" ) ) ]
{
  /* delimeter exists */
  let src = "abc def";
  let iter = wstring_tools::string::split()
  .src( src )
  .delimeter( " " )
  .stripping( false )
  .perform();
  let iterated = iter.map( | e | String::from( e ) ).collect::< Vec< _ > >();
  assert_eq!( iterated, vec![ "abc", " ", "def" ] );

  /* delimeter not exists */
  let src = "abc def";
  let iter = wstring_tools::string::split()
  .src( src )
  .delimeter( "g" )
  .perform();
  let iterated = iter.map( | e | String::from( e ) ).collect::< Vec< _ > >();
  assert_eq!( iterated, vec![ "abc def" ] );
}

§To add to your project

cargo add wstring_tools

§Try out from the repository

git clone https://github.com/Wandalen/wTools
cd wTools
cd sample/rust/wstring_tools_trivial
cargo run

Modules§

exposed
String tools. Exposed namespace of the module.
orphan
String tools. Parented namespace of the module.
prelude
String tools. Namespace of the module to include with use module::*.
protected
String tools. Protected namespace of the module.
string
String tools. String tools.

Traits§

IsolateOptionsAdapter
String tools.
ParseOptionsAdapter
String tools.
SplitOptionsAdapter
String tools.

Functions§

indentation
String tools.
isolate
String tools.
isolate_left
String tools.
isolate_right
String tools.
request_parse
String tools.
split
String tools.