+
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("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:

About

Micro check library in Golang.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载