whitespace

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 0 Imported by: 12

README

go-whitespace

A small Golang library for dealing with whitespace.

Note that this Go library accounts for all 26 UNICODE whitespace characters (and not just the standard ASCII ones), as well as accounts for all 7 UNICODE mandatory break characters.

Documention

Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-whitespace

GoDoc

Usage

To use this Golang library, use with something like:

import "github.com/reiver/go-whitespace"

// ...


if whitespace.IsWhitespace(r) {
	//@TODO: Do something.
}
import "github.com/reiver/go-whitespace"

// ...

if whitespace.IsMandatoryBreak(r) {
	//@TODO: Do something.
}

Documentation

Overview

Package whitespace provides helper functions to deal with whitespace; and accounts for all 26 UNICODE whitespace characters, and all 7 UNICODE mandatory break characters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMandatoryBreak

func IsMandatoryBreak(r rune) bool

IsMandatoryBreak is a function tells you if a rune is a mandatory break character or not; it accounts for all 7 UNICODE mandatory break characters.

func IsWhitespace

func IsWhitespace(r rune) bool

IsWhitespace is a function tells you if a rune is a whitespace character or not; it accounts for all 26 UNICODE whitespace characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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