mirror of http://gitlab.batiao8.com/yic/film.git
22 lines
328 B
Go
22 lines
328 B
Go
package util
|
||
|
||
import (
|
||
"fmt"
|
||
"regexp"
|
||
"strings"
|
||
)
|
||
|
||
func MoneyFen(money int64) string {
|
||
return fmt.Sprintf("%.2f", float64(money)/100)
|
||
}
|
||
|
||
func CinemaBrand(name string) string {
|
||
|
||
reg, err := regexp.Compile("[^((]*")
|
||
if err != nil {
|
||
panic(err)
|
||
}
|
||
r := reg.Find([]byte(name))
|
||
return strings.Trim(string(r), "\r\n\t ")
|
||
}
|