mirror of
https://github.com/samber/lo.git
synced 2026-04-22 23:47:11 +08:00
fa095e4b4f
* fix(doc): fix go playground demo URL * fix(doc): add more go playground demo URL
29 lines
502 B
Markdown
29 lines
502 B
Markdown
---
|
|
name: RuneLength
|
|
slug: runelength
|
|
sourceRef: string.go#L160
|
|
category: core
|
|
subCategory: string
|
|
playUrl: https://go.dev/play/p/BXT52mBk0zO
|
|
variantHelpers:
|
|
- core#string#runelength
|
|
similarHelpers:
|
|
- core#string#substring
|
|
- core#string#chunkstring
|
|
- core#string#words
|
|
- core#string#capitalize
|
|
- core#string#ellipsis
|
|
position: 30
|
|
signatures:
|
|
- "func RuneLength(str string) int"
|
|
---
|
|
|
|
Returns the number of runes (Unicode code points) in a string.
|
|
|
|
```go
|
|
lo.RuneLength("hellô")
|
|
// 5
|
|
```
|
|
|
|
|