cstrings

package
v0.0.0-...-91e9092 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 45

Documentation

Overview

Copyright 2015 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidDomainName

func IsValidDomainName(s string) bool

IsValidDomainName is a primitive domain name checker taken from go standard library

func IsValidUnixUser

func IsValidUnixUser(u string) bool

IsValidUnixUser returns true if passed string can be used to create a valid UNIX user

func Split

func Split(delim, escape rune, v string) []string

Split splits the string v using delimiter rune. Rune can be escaped if prefixed with the escape rune.

func SplitAt

func SplitAt(args []string, sep string) ([]string, []string)

SplitAt splits array of strings at a given separator

func SplitComma

func SplitComma(v string) []string

SplitComma splits a comma-delimted string, comma can be escaped using '\' escape rune.

func WithoutFlag

func WithoutFlag(args []string, flag string) []string

WithoutFlag removes the flag from the argument list

Types

This section is empty.

Jump to

Keyboard shortcuts

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