let str1 = '👍🏽🍆🌮'
let str2 = 'abc'
let str3 = 'あいう'
<: str1.index_of('👍🏽', -3) // -1
<: str2.index_of('a', -3) // 0
<: str3.index_of('あ', -3) // 0
<: str1.incl('👍') // true
<: str1.incl('🏽') // true
<: str1.starts_with('👍🏽', -3) // false
<: str2.starts_with('a', -3) // true
<: str3.starts_with('あ', -3) // true
<: str1.ends_with('👍🏽', -2) // false
<: str2.ends_with('a', -2) // true
<: str3.ends_with('あ', -2) // true
<: str1.pad_start(4, '0') // 👍🏽🍆🌮
<: str2.pad_start(4, '0') // 0abc
<: str3.pad_start(4, '0') // 0あいう
<: str1.pad_end(4, '0') // 👍🏽🍆🌮
<: str2.pad_end(4, '0') // abc0
<: str3.pad_end(4, '0') // あいう0
👍🏽のような一文字を作るコードポイントの数が1より大きい文字が含まれる文字列について、一部の組み込み関数が正しく動作しない例
Playground