1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
12 * nsTString::SetCharAt
16 bool nsTString
<T
>::SetCharAt(char16_t aChar
, index_type aIndex
) {
17 if (aIndex
>= this->mLength
) {
21 if (!this->EnsureMutable()) {
22 this->AllocFailed(this->mLength
);
25 this->mData
[aIndex
] = char_type(aChar
);
30 void nsTString
<T
>::Rebind(const char_type
* data
, size_type length
) {
31 // If we currently own a buffer, release it.
34 this->SetData(const_cast<char_type
*>(data
), length
, DataFlags::TERMINATED
);
35 this->AssertValidDependentString();
38 template class nsTString
<char>;
39 template class nsTString
<char16_t
>;
41 template class nsTAutoStringN
<char, 64>;
42 template class nsTAutoStringN
<char16_t
, 64>;