1. 程式人生 > >java_函數手冊_String_1.2_codePointCount_獲取指定範圍文本代碼點

java_函數手冊_String_1.2_codePointCount_獲取指定範圍文本代碼點

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_獲取指定範圍文本代碼點