[Solved] How to divide/split a string in two parts?

Hello, I have a little question.
How can I divide for example: hello (I have this in a text variable)
and I want that h in a new variable and ello in another one.
I try but I can’t get the blocks to work properly.

Can somebody help me, please. Thank you!

@a01635401rl can you screenshot your code?

1 Like

Hi, @a01635401rl! :wave:

You can use this block, but you would require a specific no. of how many letters you want to sub-string. -

image

Thanks! :blush:

1 Like

I have almost nothing, it’s a short exercise, the problem is that I really dont know how to delimit that the “s” is stored in one variable and “aint” in another variable
image

thanks!

Do you mean something like this?

1 Like

yes, only that for example saint can change to another word with more or fewer letters, how can I configure it so that it always gets the first letter and then the rest, regardless of the number of words in the variable

I think you mean “regardless of the number of letters” but maybe you meant words. Regardless, you should be able to make this work for any length of text by replacing the 5 in “to letter # 5” in @nobelp1npk’s example above with the “length of” block in the Text drawer and then adding app word to it.

1 Like

That’s right sorry, I meant letters, I got confused.
Okay, thank you @nobelp1npk and @tatiang for helping!!!

This should work

2 Likes

yes.