substring


Description:

public static string substring (string? s, int start, int end)

Returns the substring from start (inclusive) to end (exclusive).

Example:

    assert (Strings.substring ("hello world", 0, 5) == "hello");

Parameters:

s

the string.

start

start index (inclusive).

end

end index (exclusive).

Returns:

the substring, or empty string if indices are invalid.