Log(Gstr("alfaiz")) 'returns : a%l%f%a%i%z%
Sub Gstr(str As String) As String
Dim r As String = ""
For i =0 To str.Length-1
Dim c As Char= str.CharAt(i)
' r = r & c & "%" 'this one works too
r =$"${r}${c}%"$
Next
Return r
End Sub
Your question is not clear. Please clarify with an example if the above code does not answer your question.
Log(Gstr("alfaiz")) 'returns : a%l%f%a%i%z%
Sub Gstr(str As String) As String
Dim r As String = ""
For i =0 To str.Length-1
Dim c As Char= str.CharAt(i)
' r = r & c & "%" 'this one works too
r =$"${r}${c}%"$
Next
Return r
End Sub
Your question is not clear. Please clarify with an example if the above code does not answer your question.