MCPcopy Create free account
hub / github.com/apache/fory / read_latin1_standard

Function read_latin1_standard

rust/fory-core/src/util/string_util.rs:765–770  ·  view source on GitHub ↗
(reader: &mut Reader, len: usize)

Source from the content-addressed store, hash-verified

763
764 #[inline]
765 pub fn read_latin1_standard(reader: &mut Reader, len: usize) -> Result<String, Error> {
766 let slice = reader.sub_slice(reader.get_cursor(), reader.get_cursor() + len)?;
767 let result: String = slice.iter().map(|&b| b as char).collect();
768 reader.move_next(len);
769 Ok(result)
770 }
771
772 #[inline]
773 pub fn read_utf8_standard(reader: &mut Reader, len: usize) -> Result<String, Error> {

Callers 1

benchmark_read_latin1Function · 0.85

Calls 4

sub_sliceMethod · 0.80
get_cursorMethod · 0.80
move_nextMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected