[][src]Function voca_rs::manipulate::expand_tabs

pub fn expand_tabs(subject: &str, tabsize: usize) -> String

Returns a copy of subject expands the tab characters using spaces.

Arguments

  • subject - The string to expand.
  • tabsize - The tab size.

Example

use voca_rs::*;
manipulate::expand_tabs("This is\tgood", 4);
// => "This is    good"
manipulate::expand_tabs("no\tspaces", 0);
// => "nospaces"
use voca_rs::Voca;
"This is\tgood"._expand_tabs(4);
// => "This is    good"