CTRE Phoenix 6 C++ 24.3.0
string_util.hpp File Reference
#include "ctre/phoenix/export.h"
#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. More...
 
CTREXPORT std::string ctre::phoenix::string_util::toLower (std::string_view input)
 Creates a new, lowercase version of the given string. More...
 
CTREXPORT void ctre::phoenix::string_util::makeLower (std::string &input)
 Converts the given string to lowercase in-place. More...
 
CTREXPORT std::string ctre::phoenix::string_util::toUpper (std::string_view input)
 Creates a new, uppercase version of the given string. More...
 
CTREXPORT void ctre::phoenix::string_util::makeUpper (std::string &input)
 Converts the given string to uppercase in-place. More...
 
CTREXPORT int ctre::phoenix::string_util::strcmp_nocase (char const *a, char const *b)
 Case-insensitive strcmp. More...
 
CTREXPORT uint32_t ctre::phoenix::string_util::safe_copyDoubles (double *dest, double const *src, int32_t numDoubles, int32_t capacityDoubles)
 
CTREXPORT uint32_t ctre::phoenix::string_util::safe_copyDoubles (double *dest, std::vector< double > const &src, int32_t capacityDoubles)
 
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. More...
 
CTREXPORT char * ctre::phoenix::string_util::safe_strcpy (char *dest, char const *src, size_t capacity)
 Safely copies a string to the destination. More...
 
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. More...
 
CTREXPORT char * ctre::phoenix::string_util::safe_strcat (char *dest, char const *src, size_t capacity)
 Safely concatenates a string to the destination. More...
 
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. More...
 
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. More...
 
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. More...
 
template<typename T >
bool ctre::phoenix::string_util::toNumber (std::string const &str, T &value)
 Converts string to number while informing caller if operation was successful. More...