Get the value of last 4 digits from a string
The user has a serial number (string) with 30 characters.
When the user inserts this serial into the plugin, I can get the whole serial input string with
What about if I only want to get the last 4 characters of this input? Any helps appreciated.
orange last edited by orange
You can use
.substringthat substracts the choosen values from a string. (Start index: Begins from 0)
ustk last edited by ustk
@Steve-Mohican You can use
var subString = String.substring(String.length - 4, String.length);
Wow that was quick, thank you guys, you've been very helpful, much respect!!