본문 바로가기
java/method 정리

toCharArray()

by 일상코더 2022. 9. 27.
//반환타입이 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. The maximum number of arguments is limited 
       by the maximum dimension of a Java array as defined by The Java™ Virtual Machine Specification. 
       The behaviour on a null argument depends on the conversion.
       
Returns: A formatted string

 

 

파라미터 :
        format – 형식 문자열 
        args – 형식 문자열의 형식 지정자가 참조하는 인수입니다. 
        형식 지정자보다 많은 인수가 있는 경우 추가 인수는 무시됩니다. 
        인수의 수는 가변적이며 0일 수 있습니다. 
        최대 인수 수는 Java™ 가상 머신 사양에 정의된 Java 배열의 최대 차원에 의해 제한됩니다. 
        null 인수에 대한 동작은 변환에 따라 다릅니다.
        
리턴값 : 형식이 지정된 문자열

 

'java > method 정리' 카테고리의 다른 글

isAlphabetic()  (0) 2022.09.28
indexOf()  (0) 2022.09.27
valueOf()  (0) 2022.09.27
charAt()  (0) 2022.09.27

댓글