// Copyright 2019 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. #ifndef FUCHSIA_WEB_COMMON_STRING_UTIL_H_ #define FUCHSIA_WEB_COMMON_STRING_UTIL_H_ #include #include #include "base/strings/string_piece.h" // Creates a byte vector from a string. std::vector StringToBytes(base::StringPiece str); // Creates a string from a byte vector. base::StringPiece BytesAsString(const std::vector& bytes); #endif // FUCHSIA_WEB_COMMON_STRING_UTIL_H_