MCPcopy Create free account
hub / github.com/douchuan/algorithm / t_char_at

Function t_char_at

src/common/util.rs:46–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44
45#[test]
46fn t_char_at() {
47 assert_eq!(b'a' as i32, byte_at_checked("abc", 0));
48 assert_eq!(b'b' as i32, byte_at_checked("abc", 1));
49 assert_eq!(b'c' as i32, byte_at_checked("abc", 2));
50 assert_eq!(-1, byte_at_checked("abc", 3));
51}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected