package ch05.sec05;
public class IndexOfContainsExample {
public static void main(String[] args) {
String subject="자바 프로그래밍";
int location=subject.indexOf("프");//해당 문자열 인덱스 값을 찾을 때 (왼쪽부터)
//int location=subject.indexOf("프프");//찾으면 인덱스값을 리턴. 그렇지 않으면 -1값 리턴.
System.out.println(subject.lastIndexOf("프"));//(오른쪽부터)
System.out.println(location);
boolean result =subject.contains("자 바");//해당 문자열 찾을 때
System.out.println(result);
System.out.println(" AbC edFg ");
System.out.println(" AbC edFg ".trim());//문자열의 앞뒤의 빈칸 제거
System.out.println("AbCedFg".toUpperCase());//소문자>대문자
System.out.println("AbCedFg".toLowerCase());//대문자>소문자
System.out.println(1+""+1);//문자열로 봐꾸기
System.out.println(String.valueOf(1)+1);
}
}