B4J Question Smart String Literal in a Smart String Literal?

tchart

Well-Known Member
Licensed User
Longtime User
I need to put an example Smart String Literal within a Smart String Literal.

It seems to interpret this as a variable.

Example, my B4J code is this;

B4X:
resp.Write($"{"Result" : "${t}"}"$)

I want to write this out as a string. I tried this but it doesnt work.

B4X:
Dim tt As String
tt = $"resp.Write($"{"Result" : "${t}"}"$)"$

Is this possible?
 

Cableguy

Expert
Licensed User
Longtime User
Use Chr(XXX) where XXX is the $ ASCII value
 
Upvote 0

Roycefer

Well-Known Member
Licensed User
Longtime User
B4X:
Dim tt As String
tt = "resp.Write(" & "$""{""Result"" : ""${t}""}""$)"
or
B4X:
tt = "resp.Write($""{""Result"" : ""${t}""}""$)"
 
Last edited:
Upvote 0
Top