title: AnsiPos or Pos does not match result in Delphi
body: <p>I cannot find out why this happen. On windows I have a txt file from which I read first line with text <code>'[směr:A-&gt;B]'</code>.</p>
  
  <p>I thet my code with debugger. I use breakpoints so I see, that the result of <code>AnsiPos(line, '[sm')</code> is 0. Why? I suppost to get 1. But I tried to search for <code>AnsiPos(line, 'sm')</code> or just <code>AnsiPos(line, 'm')</code> and still not positive result. Why? I tried <code>Pos()</code> too. Should I use different function? What I missed?</p>
  
  <pre><code>readln(f,line);
  if line[1]='[' then
  begin;
    if line[2]='s' then
       if AnsiPos(line, '[sm') &gt; 0 then
          begin
            if AnsiPos(line, 'B-&gt;A') &gt; 0 then
              smerTestu := 'B'
            else
              smerTestu := 'A';
          end;
  end;
  </code></pre>