Browse Source

Moved access operator. Made access operator const.

release/0.19
JustinAJ 11 years ago
parent
commit
c7f5eac10c
  1. 3
      Jupiter/Readable_String.h
  2. 3
      Jupiter/String_Type.h

3
Jupiter/Readable_String.h

@ -173,6 +173,9 @@ namespace Jupiter
*/ */
size_t println(FILE *out) const; size_t println(FILE *out) const;
size_t println(std::basic_ostream<T> &out) const; size_t println(std::basic_ostream<T> &out) const;
/** Access operator */
inline T &operator[](size_t index) const { return this->get(index); };
}; };
} }

3
Jupiter/String_Type.h

@ -184,9 +184,6 @@ namespace Jupiter
template<template<typename> class R> static R<T> gotoWord(const Jupiter::String_Type<T> &in, size_t pos, const T *whitespace); template<template<typename> class R> static R<T> gotoWord(const Jupiter::String_Type<T> &in, size_t pos, const T *whitespace);
template<template<typename> class R> static R<T> gotoWord(const T *in, size_t pos, const T *whitespace); template<template<typename> class R> static R<T> gotoWord(const T *in, size_t pos, const T *whitespace);
/** Access operator */
inline T &operator[](size_t index) { return Jupiter::String_Type<T>::get(index); };
/** Mutative operators */ /** Mutative operators */
inline String_Type<T> &operator+=(const String_Type<T> &right) { this->concat(right); return *this; }; inline String_Type<T> &operator+=(const String_Type<T> &right) { this->concat(right); return *this; };
inline String_Type<T> &operator+=(const std::basic_string<T> &right) { this->concat(right); return *this; }; inline String_Type<T> &operator+=(const std::basic_string<T> &right) { this->concat(right); return *this; };

Loading…
Cancel
Save