id3string

package
v0.0.0-...-a962232 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeUTF8

func DecodeUTF8(in string) []rune

DecodeUTF8 is used when we have a JSON representation of a Frame.

func EncodeASCIIWithNullTerminator

func EncodeASCIIWithNullTerminator(val string) []byte

func EncodeRunes

func EncodeRunes(enc byte, val []rune) []byte

func EncodeRunesWithNullTerminator

func EncodeRunesWithNullTerminator(enc byte, val []rune) []byte

EncodeRunesWithNullTerminator adds all the extra bytes that id3v2.3 expects. In the case where the information is only ascii, (enc: 0), simply add a null terminator In the case of UTF-16, (enc: 1), add a BOM, then the string, then two null terminators (unicode null).

func Equal

func Equal(a, b []rune) bool

func EqualBytes

func EqualBytes(a, b []byte) bool

func ExtractNullTerminated

func ExtractNullTerminated(b []byte) []rune

ExtractNullTerminated is to be used when only a single null terminator ends a string.

func ExtractNullTerminatedASCII

func ExtractNullTerminatedASCII(b []byte) string

func ExtractNullTerminatedValueWithEncoding

func ExtractNullTerminatedValueWithEncoding(enc byte, data []byte) ([]rune, int)

func ExtractUnicode

func ExtractUnicode(b []byte) []rune

func ExtractUnicodeNullTerminated

func ExtractUnicodeNullTerminated(b []byte) []rune

ExtractNullTerminatedUnicode gets the two BOM bytes, looks for a unicode null, then extracts the middle.

func ExtractValueWithEncoding

func ExtractValueWithEncoding(enc byte, data []byte) ([]rune, int)

func IsASCII

func IsASCII(in []rune) bool

IsASCII returns true if it's only ascii; otherwise assume UTF-16 since UTF-8 is not used.

func IsASCIIBytes

func IsASCIIBytes(in []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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