Piezīmes
Lai piekļūtu šai lapai, ir nepieciešama autorizācija. Varat mēģināt pierakstīties vai mainīt direktorijus.
Lai piekļūtu šai lapai, ir nepieciešama autorizācija. Varat mēģināt mainīt direktorijus.
Switch services using the Version drop-down list. Learn more about navigation.
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Returns the length, in characters, of the input string.
Note
This function counts Unicode code points.
Syntax
strlen(source)
Learn more about syntax conventions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| source | string |
✔️ | The string for which to return the length. |
Returns
Returns the length, in characters, of the input string.
Examples
String of letters
print length = strlen("hello")
Output
| length |
|---|
| 5 |
String of letters and symbols
print length = strlen("⒦⒰⒮⒯⒪")
Output
| length |
|---|
| 5 |
String with grapheme
print strlen('Çedilla') // the first character is a grapheme cluster
// that requires 2 code points to represent
Output
| length |
|---|
| 8 |