Commit fab5f58e authored by Max Kellermann's avatar Max Kellermann

util/AllocatedString: add operator[]

parent 55be8e6f
......@@ -115,6 +115,14 @@ public:
return *value == SENTINEL;
}
reference_type operator[](size_type i) {
return value[i];
}
const reference_type operator[](size_type i) const {
return value[i];
}
pointer_type Steal() {
pointer_type result = value;
value = nullptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment