lyxstring::size_type lyxstring::find_first_of(lyxstring const & a,
size_type i) const
{
- Assert(i < rep->sz); // OURS!
+ Assert(i <= rep->sz); // OURS!
TestlyxstringInvariant(this);
for (size_type t = i; t < rep->sz; ++t) {
size_type i,
size_type n) const
{
- Assert(ptr && i < rep->sz); // OURS!
+ Assert(ptr && i <= rep->sz); // OURS!
TestlyxstringInvariant(this);
if (!n) return npos;
lyxstring::size_type lyxstring::find_first_of(value_type const * ptr,
size_type i) const
{
- Assert(ptr && i < rep->sz); // OURS!
+ Assert(ptr && i <= rep->sz); // OURS!
TestlyxstringInvariant(this);
for (size_type t = i; t < rep->sz; ++t) {
lyxstring::size_type lyxstring::find_first_of(value_type c, size_type i) const
{
- Assert(i < rep->sz); // OURS!
+ Assert(i <= rep->sz); // OURS!
TestlyxstringInvariant(this);
for (size_type t = i; t < rep->sz; ++t) {
TestlyxstringInvariant(this);
if (!rep->sz) return npos;
- Assert(i < rep->sz);
+ Assert(i <= rep->sz);
for (size_type t = i; t < rep->sz; ++t) {
if (a.find(rep->s[t]) == npos) return t;
}
size_type i,
size_type n) const
{
- Assert(ptr && i < rep->sz); // OURS!
+ Assert(ptr && i <= rep->sz); // OURS!
TestlyxstringInvariant(this);
if (!n) return (i < rep->sz) ? i : npos;
lyxstring::size_type lyxstring::find_first_not_of(value_type const * ptr,
size_type i) const
{
- Assert(ptr && i < rep->sz); // OURS!
+ Assert(ptr && i <= rep->sz); // OURS!
TestlyxstringInvariant(this);
for (size_type t = i; t < rep->sz; ++t) {
size_type i) const
{
if (!rep->sz) return npos;
- Assert(i < rep->sz); // OURS!
+ Assert(i <= rep->sz); // OURS!
TestlyxstringInvariant(this);
for (size_type t = i; t < rep->sz; ++t) {
lyxstring & lyxstring::replace(size_type i, size_type n,
value_type const * p, size_type n2)
{
- Assert(p && i < rep->sz); // OURS!
+ Assert(p && i <= rep->sz); // OURS!
TestlyxstringInvariant(this);
rep = rep->get_own_copy();
lyxstring & lyxstring::replace(size_type i, size_type n, value_type const * p)
{
- Assert(p && i < rep->sz); // OURS!
+ Assert(p && i <= rep->sz); // OURS!
TestlyxstringInvariant(this);
return replace(i, min(n, rep->sz), p, (!p) ? 0 : strlen(p));