次の方法で共有


strlen()

[ バージョン ] ドロップダウン リストを使用してサービスを切り替えます。 ナビゲーションの詳細を確認します
適用対象: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel

入力文字列の長さを文字数で返します。

Note

この関数は、Unicode コード ポイントをカウントします。

構文

strlen( ソース)

構文規則について詳しく知る。

パラメーター

件名 タイプ Required 説明
ソース string ✔️ 長さを返す文字列。

返品

入力文字列の長さを文字数で返します。

文字の文字列

print length = strlen("hello")

出力

length
5

文字と記号の文字列

print length = strlen("⒦⒰⒮⒯⒪")

出力

length
5

grapheme を含む文字列

print strlen('Çedilla') // the first character is a grapheme cluster
                        // that requires 2 code points to represent

出力

length
8