PandaRoot
StrTok.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // StrTok.h
14 //
16 #ifndef STRTOK_H
17 #define STRTOK_H
18 
19 #if _MSC_VER > 1000
20 //#pragma once
21 #endif // _MSC_VER > 1000
22 
23 class CStrTok {
24  public:
25  CStrTok();
26  virtual ~CStrTok();
27 
28  // Attributes
29  public:
33 
34  char *m_lpszNext;
36  // Operations
37  public:
38  char *GetFirst(char *lpsz, const char *lpcszDelimiters);
39  char *GetNext(const char *lpcszDelimiters);
40  void SetNext(const char *lpcszNext);
41  bool IsEOB();
42  void Break();
43  void TrimLeft(char *&lpsz, const char *lpcszDelimiters = nullptr);
44  void TrimRight(const char *lpcszDelimiters = nullptr);
45 
46  static bool IsDelimiter(char ch, const char *lpcszDelimiters);
47 };
48 
49 #endif
void TrimRight(const char *lpcszDelimiters=nullptr)
char m_chDelimiter
Definition: StrTok.h:35
bool m_bDelimiterAsToken
Definition: StrTok.h:30
char * m_lpszNext
Definition: StrTok.h:34
bool m_bOneByOneDelimiter
Definition: StrTok.h:31
void SetNext(const char *lpcszNext)
void Break()
bool m_bDelimitersInSequence
Definition: StrTok.h:32
char * GetFirst(char *lpsz, const char *lpcszDelimiters)
static bool IsDelimiter(char ch, const char *lpcszDelimiters)
bool IsEOB()
void TrimLeft(char *&lpsz, const char *lpcszDelimiters=nullptr)
virtual ~CStrTok()
Definition: StrTok.h:23
char * GetNext(const char *lpcszDelimiters)