func ToBase64(s string) string {
	return base64.StdEncoding.EncodeToString([]byte(s))
}
ToBase64 encodes a string in base64
package gosc
import (
	"bytes"
	cryrand "crypto/rand"
	"crypto/sha256"
	"encoding/base64"
	"encoding/json"
	"fmt"
	"io"
	"math/rand"
	"net"
	"net/url"
	"regexp"
	"strconv"
	"strings"
	"time"
	"unicode"
	"unicode/utf8"
)
var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
var camelingRegex = regexp.MustCompile("[0-9A-Za-z]+")
func ToBytes(s string) []byte {
	return []byte(s)
}
func ByteToString(b []byte) string {
	return string(b[:])
}
func Rstring(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}
func ReverseString(s string) string {
	return Rstring(s)
}
func LcFirst(s string) string {
	if s == "" {
		return ""
	}
	r, n := utf8.DecodeRuneInString(s)
	return string(unicode.ToLower(r)) + s[n:]
}
func LowerFirst(s string) string {
	return LcFirst(s)
}
func UcFirst(s string) string {
	if s == "" {
		return ""
	}
	r, n := utf8.DecodeRuneInString(s)
	return string(unicode.ToUpper(r)) + s[n:]
}
func UpperFirst(s string) string {
	return UcFirst(s)
}
func ToSnake(s string) string {
	s = strings.Replace(strings.Replace(s, "-", "_", -1), " ", "_", -1)
	runes := []rune(s)
	length := len(runes)
	var out []rune
	for i := 0; i < length; i++ {
		if i > 0 && unicode.IsUpper(runes[i]) && ((i+1 < length && unicode.IsLower(runes[i+1])) || unicode.IsLower(runes[i-1])) {
			out = append(out, '_')
		}
		out = append(out, unicode.ToLower(runes[i]))
	}
	return string(out)
}
func ToSnakeCase(s string) string {
	return ToSnake(s)
}
func ToCamel(s string) string {
	byteSrc := []byte(s)
	chunks := camelingRegex.FindAll(byteSrc, -1)
	for idx, val := range chunks {
		val = bytes.ToLower(val)
		if idx > 0 {
			chunks[idx] = bytes.Title(val)
		}
	}
	return string(bytes.Join(chunks, nil))
}
func ToCamelCase(s string) string {
	return ToCamel(s)
}
func ToPascal(s string) string {
	byteSrc := []byte(s)
	chunks := camelingRegex.FindAll(byteSrc, -1)
	for idx, val := range chunks {
		chunks[idx] = bytes.Title(val)
	}
	return string(bytes.Join(chunks, nil))
}
func ToPascalCase(s string) string {
	return ToPascal(s)
}
func ToKebab(s string) string {
	s = strings.Replace(strings.Replace(s, "_", "-", -1), " ", "-", -1)
	runes := []rune(s)
	length := len(runes)
	var out []rune
	for i := 0; i < length; i++ {
		if i > 0 && unicode.IsUpper(runes[i]) && ((i+1 < length && unicode.IsLower(runes[i+1])) || unicode.IsLower(runes[i-1])) {
			out = append(out, '-')
		}
		out = append(out, unicode.ToLower(runes[i]))
	}
	return string(out)
}
func ToKebabCase(s string) string {
	return ToKebab(s)
}
func ToInt(s string) int {
	if strings.Contains(s, ".") {
		s = strings.Split(s, ".")[0]
	}
	v, err := strconv.Atoi(s)
	if err != nil {
		return 0
	}
	return v
}
func ToInt64(s string) int64 {
	if strings.Contains(s, ".") {
		s = strings.Split(s, ".")[0]
	}
	v, err := strconv.ParseInt(s, 10, 64)
	if err != nil {
		return 0
	}
	return v
}
func ToUint(s string) uint {
	if strings.Contains(s, ".") {
		s = strings.Split(s, ".")[0]
	}
	v, err := strconv.ParseUint(s, 10, 32)
	if err != nil {
		return uint(0)
	}
	return uint(v)
}