Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
deskflow::string Namespace Reference

std::string utilities More...

Classes

class  CaselessCmp
 Case-insensitive comparisons. More...

Functions

std::string format (const char *fmt,...)
 Format positional arguments.
std::string vformat (const char *fmt, va_list)
 Format positional arguments.
std::string sprintf (const char *fmt,...)
 Print a string using sprintf-style formatting.
std::string sizeTypeToString (size_t n)
 Convert a size type to a string.
size_t stringToSizeType (const std::string &string)
 Convert a string to a size type.

Detailed Description

std::string utilities

Provides functions for string manipulation.

Function Documentation

◆ format()

std::string deskflow::string::format ( const char * fmt,
... )

Format positional arguments.

Format a string using positional arguments. fmt has literal characters and conversion specifications introduced by ‘%’:

  • %% – literal ‘%’
  • %{n} – positional element n, n a positive integer, {} are literal

All arguments in the variable list are const char*. Positional elements are indexed from 1.

◆ sizeTypeToString()

std::string deskflow::string::sizeTypeToString ( size_t n)

Convert a size type to a string.

Convert an size type to a string

◆ sprintf()

std::string deskflow::string::sprintf ( const char * fmt,
... )

Print a string using sprintf-style formatting.

Equivalent to sprintf() except the result is returned as a String.

◆ stringToSizeType()

size_t deskflow::string::stringToSizeType ( const std::string & string)

Convert a string to a size type.

Convert an a string to an size type

◆ vformat()

std::string deskflow::string::vformat ( const char * fmt,
va_list  )

Format positional arguments.

Same as format() except takes va_list.