You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

strings.go 388 B

12345678910111213141516
  1. // Copyright © 2023 OpenIMSDK open source community. All rights reserved.
  2. // Licensed under the MIT License (the "License");
  3. // you may not use this file except in compliance with the License.
  4. package utils
  5. import "strconv"
  6. func IntToString(i interface{}) string {
  7. return strconv.FormatInt(int64(i.(int)), 10)
  8. }
  9. func StringToInt(i string) int {
  10. j, _ := strconv.Atoi(i)
  11. return j
  12. }