This source file includes following definitions.
- str_
- Complete
- Resize
#include "url/url_canon_stdstring.h"
namespace url_canon {
StdStringCanonOutput::StdStringCanonOutput(std::string* str)
: CanonOutput(), str_(str) {
cur_len_ = static_cast<int>(str_->size());
str_->resize(str_->capacity());
buffer_ = str_->empty() ? NULL : &(*str_)[0];
buffer_len_ = static_cast<int>(str_->size());
}
StdStringCanonOutput::~StdStringCanonOutput() {
}
void StdStringCanonOutput::Complete() {
str_->resize(cur_len_);
buffer_len_ = cur_len_;
}
void StdStringCanonOutput::Resize(int sz) {
str_->resize(sz);
buffer_ = str_->empty() ? NULL : &(*str_)[0];
buffer_len_ = sz;
}
}