How to get a substring of text? Ask Question

How to get a substring of text? Ask Question

I have text with length ~700. How do I get only ~30 of its first characters?

ベストアンサー1

If you have your text in your_text variable, you can use:

your_text[0..29]

おすすめ記事