AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
common.cpp File Reference

Generic helper functions. More...

#include "common.h"
#include <algorithm>
#include <cstring>
#include <sstream>
#include <string>
#include <stdlib.h>
#include <wchar.h>
Include dependency graph for common.cpp:

Go to the source code of this file.

Namespaces

 aja
 

Functions

bool aja::starts_with (const std::string &str, const std::string &needle)
 
bool aja::starts_with (const std::string &str, const char needle)
 
bool aja::starts_with (const std::wstring &wstr, const std::wstring &needle)
 
bool aja::starts_with (const std::wstring &wstr, const wchar_t needle)
 
bool aja::ends_with (const std::string &str, const std::string &needle)
 
bool aja::ends_with (const std::string &str, const char needle)
 
bool aja::ends_with (const std::wstring &wstr, const std::wstring &needle)
 
bool aja::ends_with (const std::wstring &wstr, const wchar_t needle)
 
std::string & aja::replace (std::string &str, const std::string &from, const std::string &to)
 
int aja::stoi (const std::string &str, std::size_t *idx, int base)
 
long aja::stol (const std::string &str, std::size_t *idx, int base)
 
unsigned long aja::stoul (const std::string &str, std::size_t *idx, int base)
 
unsigned long long aja::stoull (const std::string &str, std::size_t *idx, int base)
 
float aja::stof (const std::string &str, std::size_t *idx)
 
double aja::stod (const std::string &str, std::size_t *idx)
 
long double aja::stold (const std::string &str, std::size_t *idx)
 
std::string aja::to_string (bool val)
 
std::string aja::to_string (int val)
 
std::string aja::to_string (long val)
 
std::string aja::to_string (long long val)
 
std::string aja::to_string (unsigned val)
 
std::string aja::to_string (unsigned long val)
 
std::string aja::to_string (unsigned long long val)
 
std::string aja::to_string (float val)
 
std::string aja::to_string (double val)
 
std::string aja::to_string (long double val)
 
bool aja::string_to_wstring (const std::string &str, std::wstring &wstr)
 
bool aja::wstring_to_string (const std::wstring &wstr, std::string &str)
 
size_t aja::local_min (const size_t &a, const size_t &b)
 
bool aja::string_to_cstring (const std::string &str, char *c_str, size_t c_str_size)
 
void aja::split (const std::string &str, const char delim, std::vector< std::string > &elems)
 
void aja::split (const std::wstring &str, const wchar_t delim, std::vector< std::wstring > &elems)
 
std::vector< std::string > aja::split (const std::string &str, const char delim)
 
std::vector< std::wstring > aja::split (const std::wstring &str, const wchar_t delim)
 
std::vector< std::string > aja::split (const std::string &inStr, const std::string &inDelim)
 
std::vector< std::wstring > aja::split (const std::wstring &inStr, const std::wstring &inDelim)
 
std::string & aja::lower (std::string &str)
 
std::string & aja::upper (std::string &str)
 
std::string & aja::lstrip (std::string &str, const std::string &ws)
 
std::string & aja::rstrip (std::string &str, const std::string &ws)
 
std::string & aja::strip (std::string &str, const std::string &ws)
 
std::string aja::join (const std::vector< std::string > &parts, const std::string &delim)
 
std::string aja::join (const std::set< std::string > &parts, const std::string &delim)
 
char * aja::safer_strncpy (char *target, const char *source, size_t num, size_t maxSize)
 
bool aja::is_hex_digit (const char inChr)
 
bool aja::is_decimal_digit (const char inChr)
 
bool aja::is_alpha_numeric (const char inChr)
 
bool aja::is_legal_decimal_number (const std::string &inStr, const size_t inMaxLength)
 
uint64_t aja::is_legal_hex_serial_number (const std::string &inStr)
 
bool aja::is_alpha_numeric (const std::string &inStr)
 

Detailed Description

Generic helper functions.

Definition in file common.cpp.