

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
use singly linked list as a data structure to re-implement the Java String class.
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!


char charAt(int index) Returns the char value at the specified index.
Int (^) indexOf (int ch, int fromIndex)
Int (^) indexOf (String str, int fromIndex)
Int lastIndexOf(int ch, int fromIndex) Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index.
Int lastIndexOf(String str, int fromIndex) Returns the index within this string of the last occurrence of the specified substring, searching backward starting at the specified index.
SLLString replaceFirst(String regex, String replacement) Replaces the first substring of this string that matches the given regular expression with the given replacement.
SLLString[] split(String regex, int limit) Splits this string around matches of the given regular expression.
SLLString substring(int beginIndex, int endIndex) Returns a new string that is a substring of this string.
SLLString toUpperCase() Converts all of the characters in this String to upper case using the rules of the default locale.
SLLString trim() Returns a copy of the string, with leading and trailing whitespace omitted.