[erlang-questions] comparing strings

OvermindDL1 overminddl1@REDACTED
Sat Dec 28 01:35:34 CET 2013


That is because when the shell prints a type and that type is a stringlist
then it escapes it.  Do this instead to see what the string contains:
io:format("~s", [TheStringValHere]).
On Dec 27, 2013 10:33 AM, "Rodolfo Dias" <dias.rodolfo@REDACTED> wrote:

> Thanks a lot,
>
>      I suspected that \ was a escape, but I stayed confuse when I did
>
> 71> "nitro\\) opera".
> "nitro\\) opera"
>
> I expected see "nitro\) opera".
>
>
> Best Regards
> Rodolfo Dias
>
>
> 2013/12/27 Dmitry Kolesnikov <dmkolesnikov@REDACTED>
>
>> Hello,
>>
>> make: *** No rule to make target `sense'.  Stop.
>>
>> \ is used as escape symbol at shell. \) is interpreted as )
>> "nitro\\) opera" =:= "nitro) opera".
>> false
>>
>> - Dmitry
>>
>> On Dec 27, 2013, at 5:11 PM, Rodolfo Dias <dias.rodolfo@REDACTED> wrote:
>>
>> > Hi all,
>> >
>> >    I am creating a module to extract some information from the User
>> Agent (HTTP) and am checking the following situation.
>> >
>> > 21> "nitro\) opera" == "nitro) opera".
>> > true
>> > 22> "nitro\) opera" =:= "nitro) opera".
>> > true
>> > 23> string:equals("nitro\) opera", "nitro) opera").
>> > true
>> >
>> > Make sense?
>> >
>> >
>> > Rodolfo Dias
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > erlang-questions mailing list
>> > erlang-questions@REDACTED
>> > http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131227/f772bbc8/attachment.htm>


More information about the erlang-questions mailing list