Skip to content

nice-pink/NiceStrings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What

This repo holds a variaty of options for converting strings to something else (or the other way around).

Types

Data size

Convert strings of type 5MB to:

  • DataSize(value int64, unit string)
  • To bytes (int64)

Example:

s := "5MB"
d, _ := datasize.FromString(s)
fmt.Println(d.String())

b := d.ToBytes()
fmt.Println(b, "Bytes")

B, _ := datasize.ToBytes(s)
fmt.Println(B, "Bytes")

About

Collection of string parsing tools

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages