Deskflow 1.26.0.207
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
String.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
4 * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
5 * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
6 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
7 */
8
9#pragma once
10
11#include <cstdarg>
12#include <string>
13
15
18namespace deskflow::string {
19
21
30std::string format(const char *fmt, ...);
31
33
36std::string vformat(const char *fmt, va_list);
37
39
42std::string sprintf(const char *fmt, ...);
43
45
49{
50public:
52 bool operator()(const std::string &a, const std::string &b) const;
53
55 static bool less(const std::string_view &a, const std::string_view &b);
56
58 static bool equal(const std::string &a, const std::string &b);
59
61 static bool cmpLess(const std::string::value_type &a, const std::string::value_type &b);
62};
63
64} // namespace deskflow::string
Case-insensitive comparisons.
Definition String.h:49
static bool less(const std::string_view &a, const std::string_view &b)
Returns true iff a is lexicographically less than b.
Definition String.cpp:151
bool operator()(const std::string &a, const std::string &b) const
Same as less().
Definition String.cpp:146
static bool cmpLess(const std::string::value_type &a, const std::string::value_type &b)
Returns true iff a is lexicographically less than b.
Definition String.cpp:161
static bool equal(const std::string &a, const std::string &b)
Returns true iff a is lexicographically equal to b.
Definition String.cpp:156
std::string utilities
Definition String.cpp:17
std::string vformat(const char *fmt, va_list args)
Format positional arguments.
Definition String.cpp:28
std::string format(const char *fmt,...)
Format positional arguments.
Definition String.cpp:19
std::string sprintf(const char *fmt,...)
Print a string using sprintf-style formatting.
Definition String.cpp:106