MCPcopy Create free account
hub / github.com/cretz/stackparam / get_utf8_string

Method get_utf8_string

src/bytecode/classfile.rs:91–99  ·  view source on GitHub ↗
(&self, idx: u16)

Source from the content-addressed store, hash-verified

89 }
90
91 pub fn get_utf8_string(&self, idx: u16) -> Option<String> {
92 match self.get_utf8(idx) {
93 Some(bytes) => match String::from_utf8(bytes.clone()) {
94 Ok(string) => Some(string),
95 _ => None
96 },
97 _ => None
98 }
99 }
100
101 pub fn find_ut8_index(&self, utf8: &'static str) -> Option<usize> {
102 for i in 0..self.constants.len() {

Callers 1

parse_attributeMethod · 0.80

Calls 2

get_utf8Method · 0.80
cloneMethod · 0.80

Tested by

no test coverage detected