본문 바로가기

java/method 정리5

isAlphabetic() Determines if the specified character (Unicode code point) is an alphabet. A character is considered to be alphabetic if its general category type, provided by getType(codePoint), is any of the following: or it has contributory property Other_Alphabetic as defined by the Unicode Standard. Params: codePoint – the character (Unicode code point) to be tested. Returns: true if the character is a Uni.. 2022. 9. 28.
indexOf() Params: ch – a character (Unicode code point). //유니코드 Returns: the index of the first occurrence of the character in the character sequence represented by this object, or -1 if the character does not occur. 파라미터 : ch - 문자 리턴값 : 객체에 해당하는 문자열에 첫번째로 존재하는 문자의 인덱스 또는 해당하는 문자가 없으면 -1을 리턴 public int indexOf(int ch) { return indexOf(ch, 0); } 2022. 9. 27.
valueOf() Returns the string representation of the {@code char} array argument. The contents of the character array are copied; subsequent modification of the character array does not affect the returned string. param : data - the character array. // 매개변수 문자배열 return : a {@code String} that contains the characters of the character array. //문자배열의 문자들로 구성된 문자열 public static String valueOf(char data[]) //문자 .. 2022. 9. 27.
toCharArray() //반환타입이 char[] 문자 배열 //문자열을 조각내서 문자배열 안에 넣어줌 public char[] toCharArray() { return isLatin1() ? StringLatin1.toChars(value) : StringUTF16.toChars(value); } Params:format – A format string args – Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.. 2022. 9. 27.
charAt() public char charAt(int index)//@Range(from = 0, to = java.lang.integer.MAX_VALUE) 0~2147483647 { if (isLatin1()) { return StringLatin1.charAt(value, index); } else { return StringUTF16.charAt(value, index); } } Returns the char value at the specified index. An index ranges from 0 to length() - 1. The first char value of the sequence is at index 0, the next at index 1, and so on, as for array ind.. 2022. 9. 27.