SyntaxFix
Write A Post
Hire A Developer
Questions
With Kotlin it is as simple as:
yourString.take(10)
Returns a string containing the first n characters from this string, or the entire string if this string is shorter.
Documentation