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

Function TruncateDown

be/src/util/string-util.cc:31–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29namespace impala {
30
31Status TruncateDown(const string& str, int32_t max_length, string* result) {
32 DCHECK(result != nullptr);
33 *result = str.substr(0, std::min(static_cast<int32_t>(str.length()), max_length));
34 return Status::OK();
35}
36
37Status TruncateUp(const string& str, int32_t max_length, string* result) {
38 DCHECK(result != nullptr);

Callers 2

EvalTruncationFunction · 0.85

Calls 4

minFunction · 0.85
OKFunction · 0.85
substrMethod · 0.80
lengthMethod · 0.45

Tested by 1

EvalTruncationFunction · 0.68