mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
83acbbd523
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2072 a592a061-630c-0410-9148-cb99ea01b6c8
59 lines
1.1 KiB
C++
59 lines
1.1 KiB
C++
// -*- C++ -*-
|
|
/* This file is part of
|
|
* ======================================================
|
|
*
|
|
* LyX, The Document Processor
|
|
*
|
|
* Copyright 1995 Matthias Ettrich
|
|
* Copyright 1995-2001 The LyX Team.
|
|
*
|
|
* ====================================================== */
|
|
|
|
// This one is heavily based on the substring class in The C++
|
|
// Programming Language by Bjarne Stroustrup
|
|
|
|
#ifndef LSUBSTRING_H
|
|
#define LSUBSTRING_H
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface
|
|
#endif
|
|
|
|
|
|
#include "LString.h"
|
|
#include "LRegex.h"
|
|
|
|
///
|
|
class LSubstring {
|
|
public:
|
|
///
|
|
typedef string::size_type size_type;
|
|
///
|
|
LSubstring(string & s, size_type i, size_type n);
|
|
///
|
|
LSubstring(string & s, string const & s2);
|
|
///
|
|
LSubstring(string & s, string::value_type const * p);
|
|
///
|
|
LSubstring(string & s, LRegex const & r);
|
|
///
|
|
LSubstring & operator=(string const &);
|
|
///
|
|
LSubstring & operator=(LSubstring const &);
|
|
///
|
|
LSubstring & operator=(string::value_type const *);
|
|
///
|
|
LSubstring & operator=(string::value_type);
|
|
///
|
|
operator string() const;
|
|
private:
|
|
///
|
|
string * ps;
|
|
///
|
|
size_type pos;
|
|
///
|
|
size_type n;
|
|
};
|
|
|
|
#endif
|