posix

package
v0.0.0-...-a8e4d9d Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SafeStr strMapFn = func(r rune) rune {
	switch {
	case r >= 'A' && r <= 'Z':
		fallthrough
	case r >= 'a' && r <= 'z':
		fallthrough
	case r >= '0' && r <= '9':
		fallthrough
	case r == '.':
		fallthrough
	case r == '_':
		fallthrough
	case r == '-':
		return r
	default:
		return '_'
	}
}

SafeStr maps a rune to the POSIX Portable Filename Character set. Any rune outside of the range defined by POSIX is rendered as '_'.

http://pubs.opengroup.org/onlinepubs/9699919799//basedefs/V1_chap03.html#tag_03_278

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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