BashSpark
Loading...
Searching...
No Matches
shell_def.h File Reference

Defines and implements some hightly recurrent helper functions. More...

#include <string>
Include dependency graph for shell_def.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  bs
 BashSpark main namespace.
 

Functions

constexpr bool bs::is_arg (const std::string_view &sArg)
 Check whether a std::string represents a valid unsigned integer argument.
 
bool bs::is_arg (const std::string &sArg)
 Check whether a std::string represents a valid unsigned integer argument.
 
constexpr bool bs::is_var (const std::string_view &sVar)
 Internal helper: check whether the given string_view is a valid variable name.
 
bool bs::is_var (const std::string &sVar)
 Internal helper: check whether the given string_view is a valid variable name.
 
constexpr bool bs::is_number (const std::string_view &sArg)
 Checks if the provided string is a valid representation of a number.
 

Detailed Description

Defines and implements some hightly recurrent helper functions.

Provides an interface to retrieve and set variables

Date
Created on 2/11/25
Author
Dante Doménech Martínez

This file is part of BashSpark. Copyright (C) 2025 Dante Doménech Martínez

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.