bool SplitKV(string_view input, char delim, bool trim_spaces, string_view* key,
             string_view* value) {
  std::size_t pos = input.find(delim);
  if (pos == input.npos) {
    return false;
  }

  *key = input.substr(0, pos);
  *value = input.substr(pos + 1);

  if (trim_spaces) {
    Trim(*key);
    Trim(*value);
  }

  return true;
}
bool SplitKV(string_view input, char delim, bool trim_spaces, string_view* key,
             string_view* value) {
  std::size_t pos = input.find(delim);
  if (pos == input.npos) {
    return false;
  }

  *key = input.substr(0, pos);
  *value = input.substr(pos + 1);

  if (trim_spaces) {
    Trim(*key);
    Trim(*value);
  }

  return true;
}