| 199 | } |
| 200 | |
| 201 | bool ByteString::empty() const { |
| 202 | switch (GetKind()) { |
| 203 | case ByteStringKind::kSmall: |
| 204 | return rep_.small.size == 0; |
| 205 | case ByteStringKind::kMedium: |
| 206 | return rep_.medium.size == 0; |
| 207 | case ByteStringKind::kLarge: |
| 208 | return GetLarge().empty(); |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | size_t ByteString::size() const { |
| 213 | switch (GetKind()) { |