Skip to main content

Module string

Module string 

Source
Expand description

String: UTF-8 bytes with a '\0' terminator, m_size bytes including it, m_length code points. String.Pos is a byte offset.

Functions§

lean_alloc_string⚠
lean_char_default_value
lean_copy_string⚠
lean_copy_string_nonlinear⚠
lean_decode_lossy_utf8⚠
lean_mk_ascii_string_unchecked⚠
lean_mk_string⚠
lean_mk_string_from_bytes⚠
A string from bytes; invalid sequences become U+FFFD.
lean_mk_string_from_bytes_unchecked⚠
A string from valid UTF-8 bytes.
lean_mk_string_unchecked⚠
A string from sz bytes of valid UTF-8 with len code points.
lean_slice_dec_lt⚠
lean_slice_hash⚠
lean_string_append⚠
Consumes s1, borrows s2.
lean_string_byte_size⚠
lean_string_bytes⚠
The bytes of a string without the terminator.
lean_string_capacity⚠
lean_string_compare⚠
compare as an Ordering constructor index (0 lt, 1 eq, 2 gt).
lean_string_cstr⚠
lean_string_data⚠
The list of characters of a string (consumes it).
lean_string_dec_eq⚠
lean_string_dec_lt⚠
lean_string_ensure_exclusive⚠
lean_string_eq⚠
lean_string_from_utf8_unchecked⚠
Consumes the byte array.
lean_string_get_byte_fast⚠
lean_string_hash⚠
lean_string_is_valid_pos⚠
lean_string_len⚠
Number of code points.
lean_string_length⚠
lean_string_lt⚠
lean_string_memcmp⚠
lean_string_mk⚠
String.ofList (consumes the list).
lean_string_ne⚠
lean_string_of_usize⚠
lean_string_push⚠
lean_string_size⚠
Byte size including the terminator.
lean_string_to_str⚠
The contents of a string (borrowed; the string must stay alive while the result is used).
lean_string_to_utf8⚠
lean_string_uget_byte_fast⚠
lean_string_utf8_at_end⚠
lean_string_utf8_byte_size⚠
lean_string_utf8_extract⚠
lean_string_utf8_extract_fast⚠
lean_string_utf8_get⚠
lean_string_utf8_get_bang⚠
lean_string_utf8_get_fast⚠
lean_string_utf8_get_opt⚠
lean_string_utf8_next⚠
lean_string_utf8_next_fast⚠
lean_string_utf8_prev⚠
lean_string_utf8_set⚠
Consumes s, borrows i0.
lean_string_validate_utf8⚠
murmur_hash_64a
MurmurHash64A of the bytes, as hash_str in hash.cpp.