mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-06-20 13:50:55 +02:00
nip54: trim spaces.
This commit is contained in:
parent
6f32e4da63
commit
01d5dc02c5
@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func NormalizeIdentifier(name string) string {
|
func NormalizeIdentifier(name string) string {
|
||||||
name = strings.ToLower(name)
|
name = strings.TrimSpace(strings.ToLower(name))
|
||||||
res, _, _ := transform.Bytes(norm.NFKC, []byte(name))
|
res, _, _ := transform.Bytes(norm.NFKC, []byte(name))
|
||||||
runes := []rune(string(res))
|
runes := []rune(string(res))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user