CTRE Phoenix 6 C++ 26.70.0-alpha-2
Loading...
Searching...
No Matches
string_util.hpp File Reference
#include "ctre/phoenix/export.h"
#include <span>
#include <sstream>
#include <stdint.h>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  ctre
namespace  ctre::phoenix
namespace  ctre::phoenix::string_util

Functions

CTREXPORT std::vector< std::string > ctre::phoenix::string_util::string_split (std::string const &input, char delimiter)
 Splits a string by the given delimiter.
CTREXPORT std::string ctre::phoenix::string_util::to_lower (std::string_view input)
 Creates a new, lowercase version of the given string.
CTREXPORT std::string & ctre::phoenix::string_util::make_lower (std::string &input)
 Converts the given string to lowercase in-place, returning a reference for method chaining.
CTREXPORT std::string ctre::phoenix::string_util::to_upper (std::string_view input)
 Creates a new, uppercase version of the given string.
CTREXPORT std::string & ctre::phoenix::string_util::make_upper (std::string &input)
 Converts the given string to uppercase in-place, returning a reference for method chaining.
CTREXPORT int ctre::phoenix::string_util::strcmp_nocase (char const *a, char const *b)
 Case-insensitive strcmp.
CTREXPORT size_t ctre::phoenix::string_util::safe_memcpy (void *dest, void const *src, size_t numBytesToCopy, size_t capacity)
 Safely copies data from the source to the destination.
CTREXPORT char * ctre::phoenix::string_util::safe_strcpy (char *dest, char const *src, size_t capacity)
 Safely copies a string to the destination.
CTREXPORT char * ctre::phoenix::string_util::safe_strcpy (char *dest, char const *src, size_t capacityDest, size_t capacitySrc)
 Safely copies a string to the destination.
CTREXPORT char * ctre::phoenix::string_util::safe_strcat (char *dest, char const *src, size_t capacity)
 Safely concatenates a string to the destination.
CTREXPORT char * ctre::phoenix::string_util::safe_strcat (char *dest, char const *src, size_t capacityDest, size_t capacitySrc)
 Safely concatenates a string to the destination.
CTREXPORT char * ctre::phoenix::string_util::safe_strtok (char **str_ptr, char const *delimiters)
 Safer strtok that finds and returns a pointer to the next token in *str_ptr, separated using one of the delimiters passed in.
CTREXPORT constexpr size_t ctre::phoenix::string_util::safe_strlen (char const *s, size_t capacity)
 Safely determines the length of a string with the given capacity.
template<typename T>
bool ctre::phoenix::string_util::to_number (std::string const &str, T &value)
 Converts string to number while informing caller if operation was successful.