Loading...
Searching...
No Matches
StringHelpers.hpp
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13
14#include <optional>
15#include <regex>
16
17#include "Matter.h"
18#include "Parameters.h"
19
20namespace eonc {
21
22namespace helpers {
28template <typename T>
29std::vector<T>
30get_val_from_string(std::string_view line,
31 std::optional<size_t> nelements = std::nullopt);
39std::vector<std::string> get_split_strings(std::string_view line);
46bool isNumber(std::string_view token);
47} // namespace helpers
48
49} // namespace eonc
bool isNumber(std::string_view token)
Figure out if a string has a number in it.
std::vector< std::string > get_split_strings(std::string_view line)
Split a string into constituent strings.
std::vector< T > get_val_from_string(std::string_view line, std::optional< size_t > nelements)
Parse a string into values.
RAII resource manager for the ARTn C library with global synchronization.