Is there a way to slice text? I have character limit for my API

First of all excuse me for my poor English.
I have been trying to slice text(string) since I have character limit for my API.

e.g.
Input: "“Hello, My name is John. Nice to meet you.” and I slice
Output: “Hello, My name is”…

My example in python

str = "Flower"
print(str[1:4])
>> low

I tried using slice function but it doesn’t work since it is only for array. Hope you guys can help me.
Thank you!

Use the substring function.

2 Likes

Thank you so much! I dont know how did I miss this since I read through the documents.

1 Like

Np glad I could help.

1 Like