Skip to content

agrison/go-commons-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-commons-lang

MIT License Go Documentation Go Report Card

This is a package aiming at regrouping common utilities where it makes sense in the Go language. It originated as a port of the popular Java Apache Commons StringUtils, but more will be added gradually.

Package Description
stringUtils String Utilities reflecting what's available in StringUtils
wordUtils String Utilities regarding words WordUtils
randUtils RandomUtils
mathUtils Fraction implementation of Apache Commons

Usage: stringUtils

package main

import (
	"fmt"
	strUtil "github.com/agrison/go-commons-lang/stringUtils"
)

func main() {
	lib := strUtil.Join([]string{"lang", "commons", "go"}, "-")
	fmt.Print(strUtil.Capitalize(strUtil.Reverse("olleh")))
	fmt.Print(strUtil.SwapCase(strUtil.Chomp(" fROM \n")))
	fmt.Println(strUtil.ReverseDelimited(lib, "-") + strUtil.Right("Go!! ", 2))
	// Output: Hello From go-commons-lang!
  // See the doc for all the implemented utilities
}

Installation

go get github.com/agrison/go-commons-lang

Join

PRs are more than welcome :)

Author

Alexandre Grison and obviously all the contributors of the original Apache Commons Lang.

About

go-commons-lang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages