Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 1.55 KB

README.md

File metadata and controls

64 lines (43 loc) · 1.55 KB

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("jhon@example.com") // 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: