Intl.Segmenter ã«ã¤ãã¦ãããã JavaScript ã«ã¯ Intl ã¨å¼ã°ããå½éå API ããããæ¥æãæ°å¤ã®ãã©ã¼ããããå§ãã¨ããå½éåã«ä¾¿å©ãªæ©è½ãæã£ã¦ãã¾ããIntl.Segmenter ã¯ãã® Intl ã®ä¸æ©è½ã§ãæåã»åèªã»æç« åä½ã§ã®æåååå²ãå¯è½ã«ãã¾ãã æååä½ã§ã®åå²ã§ã¯è¤æ°ã®ã³ã¼ãã¦ããããã³ã¼ããã¤ã³ããæã£ãæåãèæ ®ããæ£ç¢ºã«è¦ãç®ä¸ã®ï¼æåï¼æ¸è¨ç´ ï¼ã§åå²ã§ããã®ã§ãçµµæåãå«ãã æåæ°ã®ã«ã¦ã³ããªã©ã«ä¾¿å©ã§ãã const segmenter = new Intl.Segmenter("ja", { granularity: "grapheme" }); console.log("ð¯ðµð¨ð»âð»".length); // â 11 console.log([..."ð¯ðµð¨ð»âð»"].length); // â
{{#tags}}- {{label}}
{{/tags}}