cisst-saw
Loading...
Searching...
No Matches
cmnStrings.h File Reference

Portability layer for strings related function using underscore as prefix. More...

#include <cisstCommon/cmnPortability.h>
#include <cisstCommon/cmnExport.h>
#include <string>
#include <vector>
#include <stdarg.h>
#include <stdio.h>

Go to the source code of this file.

Macros

#define _cmnStrings_h

Functions

int cmn_snprintf (char *destination, size_t size, const char *format,...)
CISST_EXPORT void cmnStringReplaceAll (std::string &userString, const std::string &oldString, const std::string &newString)
CISST_EXPORT std::string cmnStringToUnderscoreLower (const std::string &input)

Detailed Description

Portability layer for strings related function using underscore as prefix.

Macro Definition Documentation

◆ _cmnStrings_h

#define _cmnStrings_h

Function Documentation

◆ cmnStringReplaceAll()

CISST_EXPORT void cmnStringReplaceAll ( std::string & userString,
const std::string & oldString,
const std::string & newString )

Replace all occurences of oldString by newString in userString.

◆ cmnStringToUnderscoreLower()

CISST_EXPORT std::string cmnStringToUnderscoreLower ( const std::string & input)

Convert CamelCase to lower_underscore_case. See https://gist.github.com/rodamber/2558e25d4d8f6b9f2ffdf7bd49471340