mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
We have std::format at home. This is superior for a few reasons. The caller doesn't have to remember the format string for the type. I believe std::string_views that are not null terminated are also handled correctly. Also, we don't have to maintain and test our own SPrintF.
21 lines
583 B
C++
21 lines
583 B
C++
// Copyright 2013 The Flutter 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 FLUTTER_IMPELLER_BASE_STRINGS_H_
|
|
#define FLUTTER_IMPELLER_BASE_STRINGS_H_
|
|
|
|
#include <string>
|
|
|
|
namespace impeller {
|
|
|
|
bool HasPrefix(const std::string& string, const std::string& prefix);
|
|
|
|
bool HasSuffix(const std::string& string, const std::string& suffix);
|
|
|
|
std::string StripPrefix(const std::string& string, const std::string& to_strip);
|
|
|
|
} // namespace impeller
|
|
|
|
#endif // FLUTTER_IMPELLER_BASE_STRINGS_H_
|