-
Notifications
You must be signed in to change notification settings - Fork 627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String: Add .is-empty and .length properties #7192
base: master
Are you sure you want to change the base?
Conversation
1a94a2f
to
aea12f3
Compare
Thanks a lot for the PR. What is the usecase for this? (I also wonder if it shouldn't be a property instead of a function, like the one on model/array) |
Thanks for your comment.
How can I generate the docs like https://docs.slint.dev/latest/docs/slint/reference/primitive-types/#images ? I've tried https://github.com/slint-ui/slint/blob/master/docs/development.md#documentation but it seems that only rust documentation is generated.
For
Your are right. I will figure out how it would be.
I thought so, then I found that is-float() was implemented as a function. I will check model/array and try to make them as properties. |
aea12f3
to
bedc413
Compare
Introduce two new properties for string in .slint: - .is-empty: Checks if a string is empty. - .length: 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.
bedc413
to
9dc80d7
Compare
I read https://github.com/slint-ui/slint/blob/master/docs/astro/README.md and was able to build the slintdoc. |
Olivier and I discussed this a bit in a call and came to the following conclusion:
Thanks for working on this :) |
Subsequence discussion in Mattermost yielded a new compromise on the new name for |
Introduce two new methods for string properties in .slint:
These additions enhance functionality and improve convenience when working with string properties.