utf8stream

package
v0.0.0-...-9f9e0ff Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: EPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Utf8StreamFilter

type Utf8StreamFilter struct {
	// contains filtered or unexported fields
}

Utf8StreamFilter replaces invalid runes with utf-8 placeholder character

func (*Utf8StreamFilter) FlushBuffer

func (sf *Utf8StreamFilter) FlushBuffer() []byte

FlushBuffer clears pending continuation bytes and returns placeholder for each of them. Should be used on closing stream connection.

func (*Utf8StreamFilter) ProcessRaw

func (sf *Utf8StreamFilter) ProcessRaw(data []byte) []byte

ProcessRaw returns valid utf-8 symbols from given data Invalid bytes will be replaced with utf-8 placeholder character

Jump to

Keyboard shortcuts

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