pub struct GcBuf(/* private fields */);Expand description
An owned, single Unicode grapheme cluster (akin to String).
See Gc for more details.
Implementations§
Methods from Deref<Target = Gc>§
Sourcepub fn has_marks(&self) -> bool
pub fn has_marks(&self) -> bool
Does this grapheme cluster have additional marks applied to it?
This is true if the cluster is comprised of more than a single code point.
Sourcepub fn base_char(&self) -> char
pub fn base_char(&self) -> char
Returns the “base” code point.
That is, this returns the first code point in the cluster.
Sourcepub fn base(&self) -> &Gc
pub fn base(&self) -> &Gc
Returns the “base” code point as a grapheme cluster.
This is equivalent to converting this GC into a string slice, then slicing off the bytes that make up the first code point.
Sourcepub fn mark_str(&self) -> &str
pub fn mark_str(&self) -> &str
Returns the combining marks as a string slice.
The result of this method may be empty, or of arbitrary length.
Sourcepub fn char_indices(&self) -> CharIndices<'_>
pub fn char_indices(&self) -> CharIndices<'_>
An iterator over the code points of this grapheme cluster, and their associated byte offsets.
Sourcepub fn to_lowercase(&self) -> ToLowercase<'_>
pub fn to_lowercase(&self) -> ToLowercase<'_>
Returns an iterator over the code points in the lower case equivalent of this grapheme cluster.
Sourcepub fn to_uppercase(&self) -> ToUppercase<'_>
pub fn to_uppercase(&self) -> ToUppercase<'_>
Returns an iterator over the code points in the upper case equivalent of this grapheme cluster.