Character removal

Hi everyone,

I have a simple issue regarding characters.
I wish to know how:
-To always drop remaining characters regardless the length of the string (to avoid getting nulls or inconsistency like the picture)
-To always keep last 2 characters (for example) regardless the length of string.

Is there a simple way or node for this or you need to split etc?

String remove last characters - Revit - Dynamo (dynamobim.com)

I saw this article but works on consistent length only otherwise you will get nulls like in the picture.

Thanks.

String.Substring should help with both (you may need a string.length as well): Dynamo Dictionary

1 Like

As per @jacob.small

Thank you for the replies.
The “n-” did the trick thanks!

1 Like