You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: char.go
    path of file: ./repos/chatnio/utils
    
    the code of the file until where you have to start completion: package utils

import (
	"fmt"
	"github.com/goccy/go-json"
	"regexp"
	"strconv"
	"strings"
	"time"
)

func GetRandomInt(min int, max int) int {
	return Intn(max-min) + min
}

func GenerateCode(length int) string {
	seq := IntnSeq(10, length)

	var code string
	for i := 0; i < length; i++ {
		code += strconv.Itoa(seq[i])
	}
	return code
}

func GenerateChar(length int) string {
	const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
	seq := IntnSeq(len(charset), length)

	result := make([]byte, length)
	for i := 0; i < length; i++ {
		result[i] = charset[seq[i]
    
func SortString(arr []string) []string {
	// sort string array by first char
	// e.g. ["a", "b", "c", "ab", "ac", "bc"] => ["a", "ab", "ac", "b", "bc", "c"]

	if len(arr) <= 1 {
		return arr
	}

	var result []string
	var temp []string
	var first string

	for _, item := range arr {
		if first == "" {
			first = item
			continue
		}

		if strings.HasPrefix(item, first) {
			temp = append(temp, item)
		} else {
			result = append(result, first)
			result = append(result, SortString(temp)...)
			first = item
			temp = []string{}
		}
	}

	if len(temp) > 0 {
		result = append(result, first)
		result = append(result, SortString(temp)...)
	} else {
		result = append(result, first)
	}

	return result
}