MCPcopy Create free account
hub / github.com/UiPath/uipathcli / ToStringArray

Method ToStringArray

utils/converter/string_converter.go:37–50  ·  view source on GitHub ↗
(value interface{})

Source from the content-addressed store, hash-verified

35}
36
37func (c StringConverter) ToStringArray(value interface{}) []string {
38 switch value := value.(type) {
39 case []int:
40 return c.intArrayToStringArray(value)
41 case []float64:
42 return c.floatArrayToStringArray(value)
43 case []bool:
44 return c.boolArrayToStringArray(value)
45 case []string:
46 return value
47 default:
48 return strings.Fields(fmt.Sprint(value))
49 }
50}
51
52func (c StringConverter) intArrayToStringArray(array []int) []string {
53 result := make([]string, len(array))

Callers 2

ToStringMethod · 0.95
formatPathValueMethod · 0.80

Calls 3

intArrayToStringArrayMethod · 0.95

Tested by

no test coverage detected