String and Array

  • 자주 쓰이는 String 관련 메소드
String method detail
s.length() : int get string size
s.equals(String) : boolean compare values of other string
s.charAt(int) : char get i th char
s.toCharArray() : char[] return char type array : char[]
s.substring(int begin, int end) : String get String from begin to end
s.toUpperCase() : String return UPPER case String
s.replaceAll(String reg, String replace) : String replace reg to replace
s.split(String reg) : String split String by reg and return String[]
s.trim() : String terminate space on head and tail

results matching ""

    No results matching ""