MCPcopy Create free account
hub / github.com/cel-expr/cel-go / reverse

Function reverse

ext/strings.go:785–791  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

783}
784
785func reverse(str string) (string, error) {
786 chars := []rune(str)
787 for i, j := 0, len(chars)-1; i < j; i, j = i+1, j-1 {
788 chars[i], chars[j] = chars[j], chars[i]
789 }
790 return string(chars), nil
791}
792
793func joinSeparator(strs []string, separator string) (string, error) {
794 return strings.Join(strs, separator), nil

Callers 1

CompileOptionsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected