mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
String: Add .is-empty and .character-count properties
Introduce two new properties for string in .slint: - .is-empty: Checks if a string is empty. - .character-count: Retrieves the number of grapheme clusters https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries These additions enhance functionality and improve convenience when working with string properties.
This commit is contained in:
parent
12fe2bb36d
commit
68b9dfc247
13 changed files with 200 additions and 8 deletions
|
@ -195,6 +195,8 @@ log = { workspace = true, optional = true }
|
|||
|
||||
raw-window-handle-06 = { workspace = true, optional = true }
|
||||
|
||||
unicode-segmentation = "1.12.0"
|
||||
|
||||
[target.'cfg(not(target_os = "android"))'.dependencies]
|
||||
# FemtoVG is disabled on android because it doesn't compile without setting RUST_FONTCONFIG_DLOPEN=on
|
||||
# end even then wouldn't work because it can't load fonts
|
||||
|
|
|
@ -227,5 +227,6 @@ pub mod re_exports {
|
|||
pub use once_cell::race::OnceBox;
|
||||
pub use once_cell::unsync::OnceCell;
|
||||
pub use pin_weak::rc::PinWeak;
|
||||
pub use unicode_segmentation::UnicodeSegmentation;
|
||||
pub use vtable::{self, *};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue