/[rdesktop]/sourceforge.net/trunk/seamlessrdp/ClientDLL/tokenizer.cpp
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/seamlessrdp/ClientDLL/tokenizer.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 936 by astrand, Thu Jun 30 14:46:14 2005 UTC revision 937 by astrand, Fri Jul 1 06:50:52 2005 UTC
# Line 35  bool CTokenizer::Next(CStdString & cs) Line 35  bool CTokenizer::Next(CStdString & cs)
35      cs.Empty();      cs.Empty();
36    
37      while (m_nCurPos < m_cs.GetLength()      while (m_nCurPos < m_cs.GetLength()
38             && m_delim[static_cast < BYTE > (m_cs[m_nCurPos])])              && m_delim[static_cast < BYTE > (m_cs[m_nCurPos])])
39          ++m_nCurPos;          ++m_nCurPos;
40    
41      if (m_nCurPos >= m_cs.GetLength())      if (m_nCurPos >= m_cs.GetLength())
# Line 43  bool CTokenizer::Next(CStdString & cs) Line 43  bool CTokenizer::Next(CStdString & cs)
43    
44      int nStartPos = m_nCurPos;      int nStartPos = m_nCurPos;
45      while (m_nCurPos < m_cs.GetLength()      while (m_nCurPos < m_cs.GetLength()
46             && !m_delim[static_cast < BYTE > (m_cs[m_nCurPos])])              && !m_delim[static_cast < BYTE > (m_cs[m_nCurPos])])
47          ++m_nCurPos;          ++m_nCurPos;
48    
49      cs = m_cs.Mid(nStartPos, m_nCurPos - nStartPos);      cs = m_cs.Mid(nStartPos, m_nCurPos - nStartPos);
# Line 51  bool CTokenizer::Next(CStdString & cs) Line 51  bool CTokenizer::Next(CStdString & cs)
51      return true;      return true;
52  }  }
53    
54       CStdString CTokenizer::Tail() const const const  CStdString CTokenizer::Tail() const
55       {  {
56           int nCurPos = m_nCurPos;      int nCurPos = m_nCurPos;
57    
58           while (nCurPos < m_cs.GetLength()      while (nCurPos < m_cs.GetLength()
59                  && m_delim[static_cast < BYTE > (m_cs[nCurPos])])              && m_delim[static_cast < BYTE > (m_cs[nCurPos])])
60               ++nCurPos;          ++nCurPos;
61    
62           CStdString csResult;      CStdString csResult;
63    
64           if (nCurPos < m_cs.GetLength())      if (nCurPos < m_cs.GetLength())
65               csResult = m_cs.Mid(nCurPos);          csResult = m_cs.Mid(nCurPos);
66    
67           return csResult;      return csResult;
68       }  }

Legend:
Removed from v.936  
changed lines
  Added in v.937

  ViewVC Help
Powered by ViewVC 1.1.26