runes

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: BSD-3-Clause, MIT Imports: 0 Imported by: 2

Documentation

Overview

Package runes implements functions for the manipulation of rune slices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsRune

func ContainsRune(s []rune, r rune) bool

ContainsRune reports whether the rune is contained in the runes slice s.

func Equal

func Equal(a, b []rune) bool

Equal returns a boolean reporting whether a and b are the same length and contain the same runes.

func HasPrefix

func HasPrefix(s, prefix []rune) bool

HasPrefix tests whether the rune slice s begins with prefix.

func Index

func Index(s, sep []rune) int

Index returns the index of the first instance of sep in s, or -1 if sep is not present in s.

func IndexRune

func IndexRune(s []rune, r rune) int

IndexRune returns the index of the first occurrence in s of the given rune r. It returns -1 if rune is not present in s.

func TrimLeft

func TrimLeft(s []rune, cutset string) []rune

TrimLeft returns a subslice of s by slicing off all leading UTF-8-encoded code points contained in cutset.

Types

This section is empty.

Jump to

Keyboard shortcuts

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