Ho una puntura che ha incorporato ":Come si incorporano le virgolette in una stringa di elisir?
tx <iq id="wUcdTMYuYoo41" to="[email protected]" type="set" xmlns="w:profile:picture">
come posso presentare tale stringa come un valore in Elixir
ad esempio:?
iex> s= "tx <iq id="wUcdTMYuYoo41" to="[email protected]" type="set" xmlns="w:profile:picture">"
Utilizzando ~ s e ~ S non ha aiutato
iex(20)> s=~S("tx <iq id="wUcdTMYuYoo41" to="[email protected]" type="set" xmlns="w:profile:picture">")
** (SyntaxError) iex:20: keyword argument must be followed by space after: w:
iex(20)> s=~s("tx <iq id="wUcdTMYuYoo41" to="[email protected]" type="set" xmlns="w:profile:picture">")
** (SyntaxError) iex:20: keyword argument must be followed by space after: w:
iex(20)>
Grazie. Quando tiriamo tali stringhe da un file.stream! ("Percorso/a/file") dobbiamo fare lo stesso? su ogni riga restituita? –
L'uso di 'File.Stream' sfuggirà automaticamente alle virgolette. per esempio. 'iex (4)> IO.gets"> "; > "" "" TEST "" ";" \ "\" \ "\" TEST \ "\" \ "\ n" ' – Gazler
Si prega di ~ s e ~ S non ha funzionato vedere gli errori riportati nella domanda modificata sopra –