How to extract a substring from a string using position and length

try this

String s = (String1[3:4]); // Returns “de”

1 Like