hi,
I have an array of string item and I’m passing that from config,I want all item to be enclosed with double quotes,
Ex:
Input
string = a,b,c,d
Output = “a”,“b”,“c”,“d”
How can I get the output as above
hi,
I have an array of string item and I’m passing that from config,I want all item to be enclosed with double quotes,
Ex:
Input
string = a,b,c,d
Output = “a”,“b”,“c”,“d”
How can I get the output as above
I’m passing a,b,c,d in config and
the output I want as below
Str=“a”,“b”,“c”,“d”
Where as str is string variable
Assign Activity:
Assign Activity:
Log Message Activity (optional):
Save and run the workflow.
Not using array, I’m using string variable
Input:
string = a,b,c,d
Output:
Str = “a”,“b”,“c”,“d”
Maybe we could also check with Regex Replace :
Regex.Replace(strText,"([^,]+)","""$1""")
We would also require to have the imports done to use it without the Namespace :
string.Join(“,”,inputstr.Split(“,“c).Select(Function(x) “|”+x+”|”).toarray).Replace(“|”,Chr(34))
try the above expression
cheers
can you copy and paste this exactly
String.Join(", ", array.Select(Function(item) """" + item + """").ToArray())
You can use below workflow
inputString = “a, b, c, d”
itemsArray = inputString.Split(","c)
outputString = String.Join(“,”, itemsArray.Select(Function(item) “”“” & item & “”“”))
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.