Function malachite_base::chars::crement::decrement_char
source · pub fn decrement_char(c: &mut char)
Expand description
Decrements this char
, skipping over the surrogate code
points.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is '\u{0}'
.
§Examples
use malachite_base::chars::crement::decrement_char;
let mut c = '\u{1}';
decrement_char(&mut c);
assert_eq!(c, '\u{0}');
let mut c = 'b';
decrement_char(&mut c);
assert_eq!(c, 'a');