/usr/include/paragui/ystring.h is in libparagui1.1-dev 1.1.8-3.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | /************************************************************************
* $Id: ystring.h,v 1.1.2.2 2004/09/05 10:51:41 braindead Exp $
*
* ------------
* Description:
* ------------
* ystring.h
*
* A unicode string class
*
* (C) Copyright 2004 Arabeyes, Mohammed Yousif
*
* -----------------
* Revision Details: (Updated by Revision Control System)
* -----------------
* $Date: 2004/09/05 10:51:41 $
* $Author: braindead $
* $Revision: 1.1.2.2 $
* $Source: /cvsroot/paragui/paragui/include/Attic/ystring.h,v $
*
* (www.arabeyes.org - under GPL License)
*
************************************************************************/
#ifndef YSTRING_H
#define YSTRING_H
#include <stdexcept>
#include <string>
#include <vector>
#include "ychar.h"
class DECLSPEC YString {
public:
typedef YChar value_type;
typedef std::vector<YChar>::pointer pointer;
typedef YChar & reference;
typedef const YChar & const_reference;
typedef std::vector<YChar>::size_type size_type;
typedef std::vector<YChar>::difference_type difference_type;
static const size_type npos = std::string::npos;
typedef std::vector<YChar>::iterator iterator;
typedef std::vector<YChar>::const_iterator const_iterator;
typedef std::vector<YChar>::reverse_iterator reverse_iterator;
typedef std::vector<YChar>::const_reverse_iterator const_reverse_iterator;
YString();
YString(const std::string &, size_type = 0, size_type = npos);
YString(const char *);
YString(const char *, size_type) ;
YString(size_type, char);
template <class InputIterator>
YString(InputIterator, InputIterator);
YString(const YString &, size_type = 0, size_type = npos) throw(std::out_of_range);
YString(const std::vector<YChar>);
YString(const std::vector<YChar>, size_type);
YString(size_type, YChar);
YString(const YChar);
iterator begin();
iterator end();
const_iterator begin() const;
const_iterator end() const;
reverse_iterator rbegin();
reverse_iterator rend();
const_reverse_iterator rbegin() const;
const_reverse_iterator rend() const;
size_type size() const;
size_type max_size() const;
size_type capacity() const;
bool empty() const;
reference operator[](size_type n);
const_reference operator[](size_type n) const;
const char * c_str() const;
const char * data() const;
YString & operator=(const YString &);
YString & operator=(const std::string &);
YString & operator=(const char *);
YString & operator=(char);
YString & operator=(YChar);
YString & operator=(uint32);
void reserve(size_type);
void swap(YString &);
iterator insert(iterator, const YChar &);
template <class InputIterator>
void insert(iterator, InputIterator, InputIterator);
void insert(iterator, size_type, const YChar &);
YString & insert(size_type, const YString &);
YString & insert(size_type, const YString &, size_type, size_type);
YString & insert(size_type, const char *);
YString & insert(size_type, const char *, size_type);
YString & insert(size_type, size_type, YChar);
YString & insert(size_type, size_type, char);
iterator erase(iterator) ;
iterator erase(iterator, iterator);
YString & erase(size_type = 0, size_type = npos) throw(std::out_of_range);
size_type find(YChar, size_type = 0) throw(std::out_of_range);
void push_back(const YChar &);
void pop_back();
void clear();
size_type length() const;
size_type bytes() const;
YString reverse() const;
YChar at(YString::size_type) const throw(std::out_of_range);
void setAt(YString::size_type, YChar) throw(std::out_of_range);
int compareTo(const YString &) const;
YString substr(YString::size_type, YString::size_type = std::string::npos) const throw(std::out_of_range);
const std::string utf8() const;
operator std::string() const;
/*
operator const char *() const;
*/
YString & operator+=(const YString &);
YString & operator+=(const std::string &);
YString & operator+=(const char *);
YString & operator+=(const YChar);
YString & operator+=(const char);
YString & operator+=(const uint32);
friend YString operator+(const YString &, const YString &);
friend YString operator+(const YString &, const char *);
friend YString operator+(const char *, const YString &);
friend YString operator+(const YString &, const YChar);
friend YString operator+(const YChar, const YString &);
friend YString operator+(const YString &, const char);
friend YString operator+(const char, const YString &);
friend YString operator+(const YString &, const uint32);
friend YString operator+(const uint32, const YString &);
static YString fromUtf8(const char *) throw(std::domain_error);
static YString fromUtf8(std::string) throw(std::domain_error);
private:
std::vector<YChar> unicode;
};
bool operator==(const YString &, const YString &);
bool operator==(const YString &, const char *);
bool operator==(const char *, const YString &);
bool operator!=(const YString &, const YString &);
bool operator!=(const YString &, const char *);
bool operator!=(const char *, const YString &);
bool operator<(const YString &, const YString &);
bool operator<(const YString &, const char *);
bool operator<(const char *, const YString &);
bool operator<=(const YString &, const YString &);
bool operator<=(const YString &, const char *);
bool operator<=(const char *, const YString &);
bool operator>(const YString &, const YString &);
bool operator>(const YString &, const char *);
bool operator>(const char *, const YString &);
bool operator>=(const YString &, const YString &);
bool operator>=(const YString &, const char *);
bool operator>=(const char *, const YString &);
YString operator+(const YString &, const YString &);
YString operator+(const YString &, const char *);
YString operator+(const char *, const YString &);
YString operator+(const YString &, const YChar);
YString operator+(const YChar, const YString &);
YString operator+(const YString &, const char);
YString operator+(const char, const YString &);
YString operator+(const YString &, const uint32);
YString operator+(const uint32, const YString &);
YString operator+(const YChar, const YChar);
YString operator+(const char *, const YChar);
YString operator+(const YChar, const char *);
std::ostream & operator<<( std::ostream &, YString &);
std::istream & operator>>( std::istream &, YString &);
#endif
|