blob: 917564c3e79ac04d15af55d7e477baa6bff851b1 [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/libxml/chromium/libxml_utils.h"
namespace internal {
std::string XmlStringToStdString(const xmlChar* xmlstring) {
if (!xmlstring)
return std::string();
// xmlChar*s are UTF-8, so this cast is safe.
return std::string(reinterpret_cast<const char*>(xmlstring));
}
} // namespace internal