Title: Go 言語で文字列の文字数を取得する方法 - Codize
Open Graph Title: Go 言語で文字列の文字数を取得する方法 - Codize
X Title: Go 言語で文字列の文字数を取得する方法 - Codize
Description: Go の len() はバイト数を返すため、日本語や絵文字では文字数と一致しません。utf8.RuneCountInString() で rune 数を取得する方法と、絵文字での注意点を解説します。
Open Graph Description: Go の len() はバイト数を返すため、日本語や絵文字では文字数と一致しません。utf8.RuneCountInString() で rune 数を取得する方法と、絵文字での注意点を解説します。
X Description: Go の len() はバイト数を返すため、日本語や絵文字では文字数と一致しません。utf8.RuneCountInString() で rune 数を取得する方法と、絵文字での注意点を解説します。
Domain: codize.dev
[{"@context":"https://schema.org","@type":"Organization","name":"Codize","url":"https://codize.dev","logo":"https://codize.dev/logo.jpg"},{"@context":"https://schema.org","@type":"WebSite","name":"Codize","url":"https://codize.dev","description":"AI アシスタントが学習をサポート。初心者でも安心して学べる、インタラクティブなプログラミング学習プラットフォーム。","inLanguage":"ja"}]
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"ホーム","item":"https://codize.dev"},{"@type":"ListItem","position":2,"name":"ドキュメント一覧","item":"https://codize.dev/docs"},{"@type":"ListItem","position":3,"name":"Go 言語で文字列の文字数を取得する方法"}]}
| og:site_name | Codize |
| og:locale | ja_JP |
| og:image | https://codize.dev/og.png |
| og:image:width | 1200 |
| og:image:height | 630 |
| og:type | website |
| twitter:card | summary |
| twitter:image | https://codize.dev/logo512.jpg |
Links:
| Codize | https://codize.dev/ |
| コース一覧 | https://codize.dev/courses |
| ドキュメント一覧 | https://codize.dev/docs |
| Strings, bytes, runes and characters in Go | The Go Blog | https://go.dev/blog/strings |
| builtin#len | pkg.go.dev | https://pkg.go.dev/builtin#len |
| builtin#rune | pkg.go.dev | https://pkg.go.dev/builtin#rune |
| unicode/utf8#RuneCountInString | pkg.go.dev | https://pkg.go.dev/unicode/utf8#RuneCountInString |
| Unicode Standard Annex #29 | https://unicode.org/reports/tr29/ |
| rivo/uniseg | GitHub | https://github.com/rivo/uniseg |
| Strings, bytes, runes and characters in Go | The Go Blog | https://go.dev/blog/strings |
| unicode/utf8 package | pkg.go.dev | https://pkg.go.dev/unicode/utf8 |
| コース一覧 | https://codize.dev/courses |
| ドキュメント | https://codize.dev/docs |
| 料金プラン | https://codize.dev/pricing |
| スポンサー | https://codize.dev/sponsors |
| 利用規約 | https://codize.dev/terms |
| プライバシーポリシー | https://codize.dev/privacy |
| 特定商取引法に基づく表記 | https://codize.dev/legal |
| お問い合わせ | https://forms.gle/ienrvjtjbL313kCJ6 |
Viewport: width=device-width, initial-scale=1