Cut 20 letters from sentence

Cut 20 letters from sentence
Example: hay there I am using WhatsApp
After cutting: hay there I am

And if sentence have < (less-than) 20 letters then display normally.
Thanks in advance

Check out this block:
Screenshot_20191107-235923_Chrome

5 Likes

Your result (after cutting) is not correct, should be: “hay there”

6 Likes

4 posts were split to a new topic: How to add the same text to each list item?

Hello, I know this as been marked as solved. But when they say cut 20 letters from sentence, why not just set the length as 20 instead of doing the subtraction ? Cut%20text%20003 )

I remarked that doing the math only remove the last 20 letters and if the text is even longer, you will end up with more than 20 letters.

)
Let me konw why you think?

2 Likes

Then it should have been put in another way:
“Cut out the first 20 characters as long as the length of the string is >= 20.”

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.