Ricky D Well-Known Member Licensed User Longtime User Jan 22, 2012 #1 I'd like to be able to create a string that will end up looking like <a href="bla bla" somemore stuff "hello world" with the " in the string. How do I put the "'s in it? I've tried B4X: Dim s As String s = "<a href=" & """" & "bla bla" & """" & " somemore stuff " & """" & "hello world" & """" but the """" shows nothing on the device please don't worry about the content of my string - it's just an example So how do you put a " in a string? regards, Ricky
I'd like to be able to create a string that will end up looking like <a href="bla bla" somemore stuff "hello world" with the " in the string. How do I put the "'s in it? I've tried B4X: Dim s As String s = "<a href=" & """" & "bla bla" & """" & " somemore stuff " & """" & "hello world" & """" but the """" shows nothing on the device please don't worry about the content of my string - it's just an example So how do you put a " in a string? regards, Ricky
I Inman Well-Known Member Licensed User Longtime User Jan 22, 2012 #2 You can use Chr(34) instead of quote symbol B4X: s = chr(34) & "<a href=" & chr(34) Upvote 0
U unba1300 Guest Jan 22, 2012 #3 You could also use the QUOTE keyword. B4X: QUOTE & "bla bla" & QUOTE Upvote 0
W wl Well-Known Member Licensed User Longtime User Jan 22, 2012 #4 Also, as a hint, when concatenating many strings consider using a stringbuilder, see: Basic4android - Core Wim Upvote 0
Also, as a hint, when concatenating many strings consider using a stringbuilder, see: Basic4android - Core Wim