Theseus
Compressible flow solver
Loading...
Searching...
No Matches
parse_helpers.hpp
Go to the documentation of this file.
1// Copyright (c) 2025-2026 Board of Trustees of the University of Illinois
2//
3// This file is part of Theseus.
4//
5// SPDX-License-Identifier: BSD-3-Clause
6#include <algorithm>
7#include <cctype>
8#include <string>
9
10auto to_lower = [](std::string s)
11 {
12 std::transform(s.begin(), s.end(), s.begin(),
13 [](unsigned char c) {
14 return static_cast<char>(std::tolower(c));
15 });
16 return s;
17 };
18
19auto starts_with = [](const std::string &s, const std::string &prefix)
20 {
21 return s.rfind(prefix, 0) == 0;
22 };
auto to_lower
Definition parse_helpers.hpp:10
auto starts_with
Definition parse_helpers.hpp:19