Skip to content

aliuygur/is

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is

Build Status GoDoc Go Report Card

Micro check library in Golang.

Installation

go get github.com/alioygur/is

Not only regex

It works with runes as long as is it possible.

Part of source code;

// Alpha check if the string contains only letters (a-zA-Z). Empty string is valid.
func Alpha(s string) bool {
	for _, v := range s {
		if ('Z' < v || v < 'A') && ('z' < v || v < 'a') {
			return false
		}
	}
	return true
}

Usage

package main

import "github.com/alioygur/is"
import "log"

func main()  {
    is.Email("[email protected]") // true
    is.Numeric("Ⅸ") // false
    is.UTFNumeric("Ⅸ") // true
}

for more documentation godoc

Contribute

we are waiting your contribution

  • Report problems
  • Add/Suggest new features/recipes
  • Improve/fix documentation

Many thanks to our contributors: contributors

Thanks & Authors

I use code/got inspiration from these excellent libraries: