summaryrefslogtreecommitdiff
path: root/chromium/third_party/mtpd/source/string_helpers.h
blob: 7edfc3a34f1f021cb2fc0796cf163429448e2e02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef STRING_HELPERS_H_
#define STRING_HELPERS_H_

#include <string>

namespace mtpd {

// Returns |str| if |str| is a valid UTF8 string (determined by
// base::IsStringUTF8) or an empty string otherwise.
std::string EnsureUTF8String(const std::string& str);

}  // namespace

#endif  // STRING_HELPERS_H_