...

Package strutils

Overview ▾

Package strutils provides convenient functions for string processing in unidoc internally.

func PDFDocEncodingToRunes

func PDFDocEncodingToRunes(b []byte) []rune

PDFDocEncodingToRunes decodes PDFDocEncoded byte slice `b` to unicode runes.

func PDFDocEncodingToString

func PDFDocEncodingToString(b []byte) string

PDFDocEncodingToString decodes PDFDocEncoded byte slice `b` to unicode go string.

func StringToPDFDocEncoding

func StringToPDFDocEncoding(s string) []byte

StringToPDFDocEncoding encoded go string `s` to PdfDocEncoding.

func StringToUTF16

func StringToUTF16(s string) string

StringToUTF16 encoded `s` to UTF16 and returns a string containing UTF16 runes.

func UTF16ToRunes

func UTF16ToRunes(b []byte) []rune

UTF16ToRunes decodes the UTF-16BE encoded byte slice `b` to unicode runes.

func UTF16ToString

func UTF16ToString(b []byte) string

UTF16ToString decodes the UTF-16BE encoded byte slice `b` to a unicode go string.