java_函數手冊_String_1.2_codePointCount_獲取指定範圍文本代碼點
阿新 • • 發佈:2018-03-24
args point blog AC 函數 out 技術分享 png tco
1 package calssString; 2 3 public class codePointCount___1_4 { 4 public static void main(String[] args) { 5 String strCom = "I LIKE JAVA"; 6 int strLower = strCom.codePointCount(2,9); 7 System.out.println(strLower); 8 9 strCom = "I LIKE J愛VA"; 10 strLower = strCom.codePointCount(2,9);11 System.out.println(strLower); 12 13 strCom = "I LIKE J1VA"; 14 strLower = strCom.codePointCount(2,9); 15 System.out.println(strLower); 16 } 17 }
java_函數手冊_String_1.2_codePointCount_獲取指定範圍文本代碼點