Implement flexible TextInput::draw helper
This commit is contained in:
parent
62295f554b
commit
df712f9ccf
2 changed files with 63 additions and 30 deletions
|
|
@ -21,6 +21,15 @@ impl Value {
|
|||
Self { graphemes }
|
||||
}
|
||||
|
||||
/// Returns whether the [`Value`] is empty or not.
|
||||
///
|
||||
/// A [`Value`] is empty when it contains no graphemes.
|
||||
///
|
||||
/// [`Value`]: struct.Value.html
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.len() == 0
|
||||
}
|
||||
|
||||
/// Returns the total amount of graphemes in the [`Value`].
|
||||
///
|
||||
/// [`Value`]: struct.Value.html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue