<div>Hi,</div><div><br></div><div>I'm not getting the expected result while using lists:dropwhile/2</div><div><br></div><div>Here is an example of my problem:</div><div><br></div><div>Data = <<"HTTP/1.1 205 Reset Content\r\n</div>
<div> Header-A: A\r\n</div><div> Header-C : dGhlIHNhbXBsZSBub25jZQ==\r\n</div><div> Header-D: D\r\n\r\n</div><div> ">>,</div>
<div><br></div><div>lists:dropwhile(fun(E) -> E == <<>> end, binary:split(Data, <<"\r\n">>, [trim, global])).</div><div><br></div><div>And this is the result:</div><div><br></div><div>
<div>[<<"HTTP/1.1 205 Reset Content">>,</div>
<div> <<"\n Header-A: A">>,</div><div> <<"\n Header-C dGhlIHNhbXBsZSBub25jZQ==">>,</div><div> <<"\n Header-D: D">>,<<>>,</div>
<div> <<"\n ">>]</div></div><div><br></div><div>But on the result above, there's a <<>> which if I understand the manpage of lists:dropwhile shouldn't be there.</div>
<div><br></div><div>Am I misunderstanding something?</div><div><br></div>