Deskflow 1.25.0.128
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 <string>
12
14
17namespace deskflow::string {
18
20
29std::string format(const char *fmt, ...);
30
32
35std::string vformat(const char *fmt, va_list);
36
38
41std::string sprintf(const char *fmt, ...);
42
44
48{
49public:
51 bool operator()(const std::string &a, const std::string &b) const;
52
54 static bool less(const std::string_view &a, const std::string_view &b);
55
57 static bool equal(const std::string &a, const std::string &b);
58
60 static bool cmpLess(const std::string::value_type &a, const std::string::value_type &b);
61};
62
63} // namespace deskflow::string
Case-insensitive comparisons.
Definition String.h:48
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