๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ–ฅ๏ธ ๋ฐฑ์—”๋“œ/Java

Stringํด๋ž˜์Šค ๋ฉ”์„œ๋“œ ๋ชจ์Œ

by OR15A 2023. 11. 21.
๋ฐ˜ํ™˜ํƒ€์ž…, ๋ฉ”์„œ๋“œ ์ด๋ฆ„, ๋งค๊ฐœ๋ณ€์ˆ˜๋งŒ ํ‘œ๊ธฐํ•จ

 

int length(): ๋ฌธ์ž์—ด์˜ ๊ธธ์ด(๋ฌธ์ž ์ˆ˜)๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

boolean isEmpty(): ๋ฌธ์ž์—ด์ด ๋น„์–ด์žˆ๋Š”์ง€ ์—ฌ๋ถ€๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ๋ฌธ์ž์—ด ๊ธธ์ด๊ฐ€ 0์ด๋ฉด true๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

char charAt(int index): ์ง€์ •๋œ ์ธ๋ฑ์Šค์— ์žˆ๋Š” ๋ฌธ์ž๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

int codePointAt(int index): ์ง€์ •๋œ ์ธ๋ฑ์Šค์˜ ๋ฌธ์ž(UTF-16 ์ฝ”๋“œ ์œ ๋‹›)์— ํ•ด๋‹นํ•˜๋Š” ์œ ๋‹ˆ์ฝ”๋“œ ์ฝ”๋“œ ํฌ์ธํŠธ๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

int codePointBefore(int index): ์ง€์ •๋œ ์ธ๋ฑ์Šค ์ด์ „์˜ ๋ฌธ์ž์— ํ•ด๋‹นํ•˜๋Š” ์œ ๋‹ˆ์ฝ”๋“œ ์ฝ”๋“œ ํฌ์ธํŠธ๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

int codePointCount(int beginIndex, int endIndex): ์ฃผ์–ด์ง„ ์ธ๋ฑ์Šค ๋ฒ”์œ„ ๋‚ด์˜ ์œ ๋‹ˆ์ฝ”๋“œ ์ฝ”๋“œ ํฌ์ธํŠธ ์ˆ˜๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

int offsetByCodePoints(int index, int codePointOffset): ์ง€์ •๋œ ์ธ๋ฑ์Šค์—์„œ ์‹œ์ž‘ํ•˜์—ฌ ์ฃผ์–ด์ง„ ์ฝ”๋“œ ํฌ์ธํŠธ ์˜คํ”„์…‹๋งŒํผ ์ด๋™ํ•œ ์ธ๋ฑ์Šค๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin): ๋ฌธ์ž์—ด์˜ ์ผ๋ถ€๋ฅผ char ๋ฐฐ์—ด๋กœ ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค.

void getBytes(): ๋ฌธ์ž์—ด์„ ๋ฐ”์ดํŠธ ๋ฐฐ์—ด๋กœ ์ธ์ฝ”๋”ฉํ•˜์—ฌ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ์‚ฌ์šฉ๋˜๋Š” ๋ฌธ์ž์…‹์€ ํ”Œ๋žซํผ์— ๋”ฐ๋ผ ๋‹ค๋ฅผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

boolean equals(Object anObject): ๋ฌธ์ž์—ด์ด ์ง€์ •๋œ ๊ฐ์ฒด์™€ ๊ฐ™์€์ง€ ๋น„๊ตํ•ฉ๋‹ˆ๋‹ค. ๊ฐ์ฒด๊ฐ€ ๋ฌธ์ž์—ด์ด ์•„๋‹ˆ๋ฉด false๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

boolean contentEquals(StringBuffer sb): ๋ฌธ์ž์—ด์ด ์ง€์ •๋œ StringBuffer์˜ ๋‚ด์šฉ๊ณผ ๊ฐ™์€์ง€ ๋น„๊ตํ•ฉ๋‹ˆ๋‹ค.

boolean contentEquals(CharSequence cs): ๋ฌธ์ž์—ด์ด ์ง€์ •๋œ CharSequence ๊ฐ์ฒด์™€ ๊ฐ™์€์ง€ ๋น„๊ตํ•ฉ๋‹ˆ๋‹ค.

boolean equalsIgnoreCase(String anotherString): ๋Œ€์†Œ๋ฌธ์ž๋ฅผ ๊ตฌ๋ถ„ํ•˜์ง€ ์•Š๊ณ  ๋‘ ๋ฌธ์ž์—ด์ด ๊ฐ™์€์ง€ ๋น„๊ตํ•ฉ๋‹ˆ๋‹ค.

int compareTo(String anotherString): ๋‘ ๋ฌธ์ž์—ด์„ ์‚ฌ์ „์ˆœ์œผ๋กœ ๋น„๊ตํ•ฉ๋‹ˆ๋‹ค.

int compareToIgnoreCase(String str): ๋Œ€์†Œ๋ฌธ์ž๋ฅผ ๊ตฌ๋ถ„ํ•˜์ง€ ์•Š๊ณ  ๋‘ ๋ฌธ์ž์—ด์„ ์‚ฌ์ „์ˆœ์œผ๋กœ ๋น„๊ตํ•ฉ๋‹ˆ๋‹ค.

boolean regionMatches(int toffset, String other, int ooffset, int len): ๋ฌธ์ž์—ด์˜ ์ง€์ •๋œ ๋ถ€๋ถ„์ด ๋‹ค๋ฅธ ๋ฌธ์ž์—ด์˜ ์ง€์ •๋œ ๋ถ€๋ถ„๊ณผ ์ผ์น˜ํ•˜๋Š”์ง€ ๋น„๊ตํ•ฉ๋‹ˆ๋‹ค.

boolean startsWith(String prefix, int toffset): ๋ฌธ์ž์—ด์ด ์ง€์ •๋œ ์ ‘๋‘์‚ฌ๋กœ ์‹œ์ž‘ํ•˜๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

boolean endsWith(String suffix): ๋ฌธ์ž์—ด์ด ์ง€์ •๋œ ์ ‘๋ฏธ์‚ฌ๋กœ ๋๋‚˜๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

int hashCode(): ๋ฌธ์ž์—ด์˜ ํ•ด์‹œ์ฝ”๋“œ ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

int indexOf(int ch): ๋ฌธ์ž์—ด์—์„œ ์ฃผ์–ด์ง„ ๋ฌธ์ž(์œ ๋‹ˆ์ฝ”๋“œ ์ฝ”๋“œ ํฌ์ธํŠธ)๊ฐ€ ์ฒ˜์Œ์œผ๋กœ ๋‚˜ํƒ€๋‚˜๋Š” ์ธ๋ฑ์Šค๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

int lastIndexOf(int ch): ๋ฌธ์ž์—ด์—์„œ ์ฃผ์–ด์ง„ ๋ฌธ์ž(์œ ๋‹ˆ์ฝ”๋“œ ์ฝ”๋“œ ํฌ์ธํŠธ)๊ฐ€ ๋งˆ์ง€๋ง‰์œผ๋กœ ๋‚˜ํƒ€๋‚˜๋Š” ์ธ๋ฑ์Šค๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

String substring(int beginIndex): ๋ฌธ์ž์—ด์˜ ์ง€์ •๋œ ๋ถ€๋ถ„์„ ์ƒˆ๋กœ์šด ๋ฌธ์ž์—ด๋กœ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

String concat(String str): ๋‘ ๋ฌธ์ž์—ด์„ ์—ฐ๊ฒฐํ•œ ์ƒˆ ๋ฌธ์ž์—ด์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

String replace(char oldChar, char newChar): ๋ฌธ์ž์—ด์—์„œ ์ง€์ •๋œ ๋ฌธ์ž๋ฅผ ์ƒˆ ๋ฌธ์ž๋กœ ๋Œ€์ฒดํ•œ ์ƒˆ ๋ฌธ์ž์—ด์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

boolean matches(String regex): ๋ฌธ์ž์—ด์ด ์ฃผ์–ด์ง„ ์ •๊ทœ ํ‘œํ˜„์‹๊ณผ ์ผ์น˜ํ•˜๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

boolean contains(CharSequence s): ๋ฌธ์ž์—ด์ด ์ง€์ •๋œ ๋ฌธ์ž์—ด ์‹œํ€€์Šค๋ฅผ ํฌํ•จํ•˜๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

String replaceFirst(String regex, String replacement): ๋ฌธ์ž์—ด์—์„œ ์ •๊ทœ ํ‘œํ˜„์‹๊ณผ ์ผ์น˜ํ•˜๋Š” ์ฒซ ๋ถ€๋ถ„์„ ๋‹ค๋ฅธ ๋ฌธ์ž์—ด๋กœ ๋Œ€์ฒดํ•ฉ๋‹ˆ๋‹ค.

String replaceAll(String regex, String replacement): ๋ฌธ์ž์—ด์—์„œ ์ •๊ทœ ํ‘œํ˜„์‹๊ณผ ์ผ์น˜ํ•˜๋Š” ๋ชจ๋“  ๋ถ€๋ถ„์„ ๋‹ค๋ฅธ ๋ฌธ์ž์—ด๋กœ ๋Œ€์ฒดํ•ฉ๋‹ˆ๋‹ค.

String replace(CharSequence target, CharSequence replacement): ๋ฌธ์ž์—ด์—์„œ ์ง€์ •๋œ ๋ฌธ์ž ์‹œํ€€์Šค๋ฅผ ๋‹ค๋ฅธ ๋ฌธ์ž ์‹œํ€€์Šค๋กœ ๋Œ€์ฒดํ•ฉ๋‹ˆ๋‹ค.

String[] split(String regex, int limit): ๋ฌธ์ž์—ด์„ ์ •๊ทœ ํ‘œํ˜„์‹์„ ๊ธฐ์ค€์œผ๋กœ ๋ถ„ํ• ํ•˜์—ฌ ๋ฌธ์ž์—ด ๋ฐฐ์—ด๋กœ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

String join(CharSequence delimiter, CharSequence... elements): ์—ฌ๋Ÿฌ ๋ฌธ์ž์—ด ์š”์†Œ๋ฅผ ์ง€์ •๋œ ๊ตฌ๋ถ„์ž๋กœ ๊ฒฐํ•ฉํ•˜์—ฌ ํ•˜๋‚˜์˜ ๋ฌธ์ž์—ด๋กœ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

String toLowerCase(Locale locale): ๋ฌธ์ž์—ด์˜ ๋ชจ๋“  ๋ฌธ์ž๋ฅผ ์ง€์ •๋œ ๋กœ์ผ€์ผ์˜ ์†Œ๋ฌธ์ž๋กœ ๋ณ€ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

String toUpperCase(Locale locale): ๋ฌธ์ž์—ด์˜ ๋ชจ๋“  ๋ฌธ์ž๋ฅผ ์ง€์ •๋œ ๋กœ์ผ€์ผ์˜ ๋Œ€๋ฌธ์ž๋กœ ๋ณ€ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

String trim(): ๋ฌธ์ž์—ด ์•ž๋’ค์˜ ๊ณต๋ฐฑ์„ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.

String strip(): ๋ฌธ์ž์—ด ์•ž๋’ค์˜ ํ™”์ดํŠธ์ŠคํŽ˜์ด์Šค๋ฅผ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.

String stripLeading(): ๋ฌธ์ž์—ด ์•ž์˜ ํ™”์ดํŠธ์ŠคํŽ˜์ด์Šค๋ฅผ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.

String stripTrailing(): ๋ฌธ์ž์—ด ๋’ค์˜ ํ™”์ดํŠธ์ŠคํŽ˜์ด์Šค๋ฅผ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.

int indexOfNonWhitespace(): ๋ฌธ์ž์—ด์—์„œ ์ฒซ ๋ฒˆ์งธ ๋น„๊ณต๋ฐฑ ๋ฌธ์ž์˜ ์ธ๋ฑ์Šค๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

Stream<String> lines(): ๋ฌธ์ž์—ด์„ ๋ผ์ธ ๋‹จ์œ„๋กœ ๋ถ„ํ• ํ•˜์—ฌ Stream<String> ๊ฐ์ฒด๋กœ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ ๋ผ์ธ์€ ์ค„๋ฐ”๊ฟˆ ๋ฌธ์ž(\n, \r, \r\n)๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๊ตฌ๋ถ„๋ฉ๋‹ˆ๋‹ค.

IntStream chars(): ๋ฌธ์ž์—ด์˜ ๊ฐ ๋ฌธ์ž๋ฅผ ์œ ๋‹ˆ์ฝ”๋“œ ์ฝ”๋“œ ํฌ์ธํŠธ๋กœ ๋ณ€ํ™˜ํ•˜์—ฌ IntStream์œผ๋กœ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ์ด ์ŠคํŠธ๋ฆผ์€ ๋ฌธ์ž์—ด์˜ ๊ฐ ๋ฌธ์ž๋ฅผ int ํ˜•ํƒœ๋กœ ๋‚˜ํƒ€๋‚ธ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

IntStream codePoints(): ๋ฌธ์ž์—ด์˜ ๊ฐ ๋ฌธ์ž(์„œ๋กœ๊ฒŒ์ดํŠธ ์Œ์„ ๊ณ ๋ คํ•œ)๋ฅผ ์œ ๋‹ˆ์ฝ”๋“œ ์ฝ”๋“œ ํฌ์ธํŠธ๋กœ ๋ณ€ํ™˜ํ•˜์—ฌ IntStream์œผ๋กœ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. chars()์™€ ์œ ์‚ฌํ•˜์ง€๋งŒ, UTF-16 ์„œ๋กœ๊ฒŒ์ดํŠธ ์Œ์„ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

char[] toCharArray(): ๋ฌธ์ž์—ด์˜ ๋ชจ๋“  ๋ฌธ์ž๋ฅผ ํฌํ•จํ•˜๋Š” ์ƒˆ๋กœ์šด char ๋ฐฐ์—ด์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

String format(String format, Object... args): ์ง€์ •๋œ ํ˜•์‹ ๋ฌธ์ž์—ด๊ณผ ์ธ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ˜•์‹ํ™”๋œ ๋ฌธ์ž์—ด์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. printf์™€ ์œ ์‚ฌํ•œ ํ˜•์‹ ์ง€์ • ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

String valueOf(Object obj): ์ฃผ์–ด์ง„ ๊ฐ์ฒด์˜ toString ๋ฉ”์„œ๋“œ๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ ๊ทธ ๊ฒฐ๊ณผ๋ฅผ ๋ฌธ์ž์—ด๋กœ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. null์ธ ๊ฒฝ์šฐ ๋ฌธ์ž์—ด "null"์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

String copyValueOf(char data[], int offset, int count): ์ง€์ •๋œ char ๋ฐฐ์—ด์˜ ํŠน์ • ๋ถ€๋ถ„์„ ์‚ฌ์šฉํ•˜์—ฌ ์ƒˆ ๋ฌธ์ž์—ด์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ๋ฐฐ์—ด data์˜ offset ์œ„์น˜์—์„œ ์‹œ์ž‘ํ•˜์—ฌ count ๊ธ€์ž๋ฅผ ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค.

String intern(): ๋ฌธ์ž์—ด ๊ฐ์ฒด๋ฅผ String ์ธํ„ด ํ’€์— ์ถ”๊ฐ€ํ•˜๊ณ , ๊ฐ™์€ ๋ฌธ์ž์—ด์„ ๊ฐ€์ง„ ๊ธฐ์กด ๊ฐ์ฒด์˜ ์ฐธ์กฐ๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ์„ ์ตœ์ ํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

String repeat(int count): ๋ฌธ์ž์—ด์„ ์ฃผ์–ด์ง„ ํšŸ์ˆ˜๋งŒํผ ๋ฐ˜๋ณตํ•œ ์ƒˆ ๋ฌธ์ž์—ด์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

void checkIndex(int index, int length): ์ง€์ •๋œ ์ธ๋ฑ์Šค๊ฐ€ ๋ฌธ์ž์—ด ๊ธธ์ด ๋ฒ”์œ„ ๋‚ด์— ์žˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. ์ฃผ๋กœ ๋‚ด๋ถ€์ ์œผ๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

void checkOffset(int offset, int length): ์ฃผ์–ด์ง„ ์˜คํ”„์…‹์ด ๋ฌธ์ž์—ด ๊ธธ์ด ๋ฒ”์œ„ ๋‚ด์— ์žˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. ๋‚ด๋ถ€์ ์œผ๋กœ ์‚ฌ์šฉ๋˜๋Š” ๋ฉ”์„œ๋“œ์ž…๋‹ˆ๋‹ค.

checkBoundsOffCount(int offset, int count, int length): ์ฃผ์–ด์ง„ ์˜คํ”„์…‹๊ณผ ์นด์šดํŠธ๊ฐ€ ๋ฌธ์ž์—ด์˜ ๋ฒ”์œ„๋ฅผ ๋ฒ—์–ด๋‚˜์ง€ ์•Š๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. ๋‚ด๋ถ€์ ์œผ๋กœ ์‚ฌ์šฉ๋˜๋Š” ๋ฉ”์„œ๋“œ์ž…๋‹ˆ๋‹ค.

void checkBoundsBeginEnd(int begin, int end, int length): ์‹œ์ž‘๊ณผ ๋ ์ธ๋ฑ์Šค๊ฐ€ ๋ฌธ์ž์—ด์˜ ๋ฒ”์œ„ ๋‚ด์— ์žˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. ๋‚ด๋ถ€์ ์œผ๋กœ ์‚ฌ์šฉ๋˜๋Š” ๋ฉ”์„œ๋“œ์ž…๋‹ˆ๋‹ค.

String valueOfCodePoint(int codePoint): ์ง€์ •๋œ ์œ ๋‹ˆ์ฝ”๋“œ ์ฝ”๋“œ ํฌ์ธํŠธ์— ํ•ด๋‹นํ•˜๋Š” ๋ฌธ์ž๋ฅผ ํฌํ•จํ•˜๋Š” ๋ฌธ์ž์—ด์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

 

 int length(), boolean isEmpty(),  char charAt(int index) , int codePointAt(int index), int codePointBefore(int index) ,  int codePointCount(int beginIndex, int endIndex) ,int offsetByCodePoints(int index, int codePointOffset) , void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin),  void getBytes( ),  boolean equals(Object anObject), boolean contentEquals(StringBuffer sb), boolean nonSyncContentEquals(AbstractStringBuilder sb) , boolean contentEquals(CharSequence cs) ,  boolean equalsIgnoreCase(String anotherString),  int compareTo(String anotherString),  int compareToIgnoreCase(String str), boolean regionMatches(int toffset, String other, int ooffset, int len), boolean startsWith(String prefix, int toffset)  , boolean endsWith(String suffix), int hashCode(), int indexOf(int ch) , int lastIndexOf(int ch), String substring(int beginIndex) , String concat(String str),  String replace(char oldChar, char newChar), boolean matches(String regex), boolean contains(CharSequence s),  String replaceFirst(String regex, String replacement) ,  String replaceAll(String regex, String replacement), String replace(CharSequence target, CharSequence replacement),String[] split(String regex, int limit) ,  String join(CharSequence delimiter, CharSequence... elements), String toLowerCase(Locale locale),  String toUpperCase(Locale locale), String trim() ,  String strip(), String stripLeading(), String stripTrailing(), int indexOfNonWhitespace(), Stream<String> lines(), IntStream chars() , IntStream codePoints() , char[] toCharArray(), String format(String format, Object... args) ,  String valueOf(Object obj), String copyValueOf(char data[], int offset, int count),
 String intern(),   String repeat(int count), void checkIndex(int index, int length),  void checkOffset(int offset, int length), checkBoundsOffCount(int offset, int count, int length), void checkBoundsBeginEnd(int begin, int end, int length), String valueOfCodePoint(int codePoint)