pub fn sanitise_to<R: Replace, S: Stringy>(
input: &str,
options: &Options<R>,
out: &mut S,
)
Expand description
Sanitise a file name into an existing String
. Intended for power users only.
When you use sanitise
or sanitise_with_options
, the perfect allocation is artisanally
crafted (or something). If you use this carelessly, you may actually cause more allocations
to be made, rather than less. You may therefore wish to use sufficient_alloc_size
in some
cases to calculate how much more to reserve ahead of time.
See Options
for a description of what all the options do.
After calling this, out
will be the same length or longer, never shorter. If you want to know
how much longer, store and compare the length yourself.