public class ManStringBuilderExt extends Object
Constructor and Description |
---|
ManStringBuilderExt() |
Modifier and Type | Method and Description |
---|---|
static void |
set(StringBuilder thiz,
int index,
char ch)
Implements the index operator for assignment such as
text[i] = 'x' |
public static void set(StringBuilder thiz, int index, char ch)
text[i] = 'x'
The character at the specified index
is set to ch
.
The index argument must be greater than or equal to 0
, and less than the length of this string.
index
- the index of the character to modify.ch
- the new character.IndexOutOfBoundsException
- if index
is negative or greater than or equal to length()
.Copyright © 2024. All rights reserved.