substring()

substring() — Extracts a portion of the string based on the specified starting index and (optionally) ending index.

String substring(int startIndex)
String substring(int startIndex, int endIndex)
String text = "Hello, World!";
String part = text.substring(7); // Outputs "World!"
String specificPart = text.substring(0, 5); // Outputs "Hello"

Related concepts

substring()

substring() — Structure map

Clickable & Draggable!

substring() — Related pages: