utf16

package
v0.0.0-...-d03bbad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(a Str) string

Decode an UTF-16 string into a UTF-8 string

func DecodeRunes

func DecodeRunes(s Str) []rune

Types

type Str

type Str []uint16

Str is a UTF-16 encoded string

func Encode

func Encode(a string) Str

Encode an UTF-8 string into an UTF-16 Str.

func EncodeRunes

func EncodeRunes(r []rune) Str

Encode runes into an UTF-16 Str

func NewFromRunes

func NewFromRunes(r []rune) Str

func NewStr

func NewStr(a string) Str

func S

func S(a string) Str

func (Str) Append

func (s Str) Append(o Str) Str

func (Str) Contains

func (s Str) Contains(substr Str) bool

Contains checks if substr is inside s

func (Str) Equal

func (s Str) Equal(o Str) bool

Equal checks if s is equal o

func (Str) HasPrefix

func (s Str) HasPrefix(substr Str) bool

func (Str) Index

func (s Str) Index(substr Str) int

Index the position of substr in s

func (Str) Len

func (s Str) Len() int

func (Str) Prepend

func (s Str) Prepend(o Str) Str

func (Str) Runes

func (s Str) Runes() []rune

func (Str) String

func (s Str) String() string

String is the UTF-8 string representation of Str

func (Str) TrimPrefix

func (s Str) TrimPrefix(substr Str) Str

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL