L
L
Lev Fedorov2017-10-16 15:50:55
Arduino
Lev Fedorov, 2017-10-16 15:50:55

Reading the last characters from a variable?

So, I have a variable of type String, its length is always fixed, I need to make the removal of the last 4 characters into a variable

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Zhilin, 2017-10-16
@Anton3

String str = ...;
String substr = str.substring(str.length() - 4);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question