Debian Codegraph @

strings.go

raw symbols SCIP
1 // ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
2 // 🤖 Github Repository: https://github.com/gofiber/fiber
3 // 📌 API Documentation: https://docs.gofiber.io
4
5 package utilsscip-go gomod github.com/gofiber/utils/v2 . `github.com/gofiber/utils/v2`/
6
7 import (
8 casestringsscip-go gomod github.com/gofiber/utils/v2 . `github.com/gofiber/utils/v2/strings`/ "github.com/gofiber/utils/v2/stringsscip-go gomod github.com/gofiber/utils/v2 . `github.com/gofiber/utils/v2/strings`/"
9 )
10
11 // ToLower converts ascii string to lower-case.
12 //
13 // Deprecated: use [github.com/gofiber/utils/v2/strings.ToLower] instead.
14 //
15 //go:fix inline
16 func ToLowerscip-go gomod github.com/gofiber/utils/v2 . `github.com/gofiber/utils/v2`/ToLower().(b string) string {
17 return casestringsscip-go gomod github.com/gofiber/utils/v2 . `github.com/gofiber/utils/v2/strings`/.ToLowerscip-go gomod github.com/gofiber/utils/v2 . `github.com/gofiber/utils/v2/strings`/ToLower().(b)
18 }
19
20 // ToUpper converts ascii string to upper-case.
21 //
22 // Deprecated: use [github.com/gofiber/utils/v2/strings.ToUpper] instead.
23 //
24 //go:fix inline
25 func ToUpperscip-go gomod github.com/gofiber/utils/v2 . `github.com/gofiber/utils/v2`/ToUpper().(b string) string {
26 return casestringsscip-go gomod github.com/gofiber/utils/v2 . `github.com/gofiber/utils/v2/strings`/.ToUpperscip-go gomod github.com/gofiber/utils/v2 . `github.com/gofiber/utils/v2/strings`/ToUpper().(b)
27 }
28
29 // AddTrailingSlashString appends a trailing '/' to s if it does not already end with one.
30 // If the input already ends with '/', the original string is returned.
31 // A new string is returned only when a '/' needs to be appended.
32 func AddTrailingSlashStringscip-go gomod github.com/gofiber/utils/v2 . `github.com/gofiber/utils/v2`/AddTrailingSlashString().(s string) string {
33 n := len(s)
34 if n == 0 {
35 return "/"
36 }
37 if s[n-1] == '/' {
38 return s
39 }
40 buf := make([]byte, n+1)
41 copy(buf, s)
42 buf[n] = '/'
43 return UnsafeStringscip-go gomod github.com/gofiber/utils/v2 . `github.com/gofiber/utils/v2`/UnsafeString().(buf)
44 }