MCPcopy Create free account
hub / github.com/apache/impala / Trim

Method Trim

be/src/runtime/string-value.inline.h:126–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126inline StringValue StringValue::Trim() const {
127 SimpleString this_s = ToSimpleString();
128 // Remove leading and trailing spaces.
129 int32_t begin = 0;
130 while (begin < this_s.len && this_s.ptr[begin] == ' ') {
131 ++begin;
132 }
133 int32_t end = this_s.len - 1;
134 while (end > begin && this_s.ptr[end] == ' ') {
135 --end;
136 }
137 return StringValue(this_s.ptr + begin, end - begin + 1);
138}
139
140inline void StringValue::PadWithSpaces(char* cptr, int64_t cptr_len, int64_t num_chars) {
141 DCHECK(cptr != NULL);

Callers

nothing calls this directly

Calls 1

StringValueClass · 0.70

Tested by

no test coverage detected