byteop

package
v0.5.36 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 8 Imported by: 0

README

サンプルリスト

このディレクトリには以下のサンプルがあります。

file example name note
reader_from_byteslice.go byteop_reader_from_byteslice []byte から io.Reader を生成するサンプルです.
using_repeat.go byteop_using_repeat bytes.Repeat() のサンプルです
cut_prefix_suffix.go byteop_cut_prefix_suffix bytes.{CutPrefix,CutSuffix} のサンプルです.
go124_bytes_lines.go byteop_go124_bytes_lines Go 1.24 で追加された bytes.Lines() のサンプルです.

Documentation

Overview

Package byteop -- バイトに対しての操作についてのサンプルが配置されています.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CutPrefixSuffix added in v0.5.1

func CutPrefixSuffix() error

CutPrefixSuffix は、Go 1.20 で追加された bytes.{CutPrefix,CutSuffix} のサンプルです.

bytes.{CutPrefix,CutSuffix} と strings.{CutPrefix,CutSuffix} は対で追加されている。

REFERENCES

func Go124BytesLines added in v0.5.35

func Go124BytesLines() error

Go124BytesLines は、Go 1.24 で追加された bytes.Lines() のサンプルです.

Go 1.23 で追加されたイテレータを返すようになっています。 bytes.Lines()は、バイト列を '\n' で区切ったデータをイテレータで提供してくれます。 このデータには '\n' 自身も付いた状態で取得出来るので、その点には注意が必要。 (fmt.Println()でそのまま出力すると2個改行が入ることになる)

REFERENCES

func NewRegister

func NewRegister() mapping.Register

NewRegister -- このパッケージ用のサンプルを登録する mapping.Register を生成します。

func ReaderFromByteSlice

func ReaderFromByteSlice() error

ReaderFromByteSlice -- []byte から io.Reader を生成するサンプルです.

func UsingRepeat added in v0.5.10

func UsingRepeat() error

UsingRepeat は、bytes.Repeat() のサンプルです.

REFERENCES

Types

This section is empty.

Jump to

Keyboard shortcuts

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