ba5f96c22d
- Add serialize/deserialize support for core models - Add file-based load/save functions in management services - Introduce FileManager, Config, Utility and helper utilities - Persist observer IDs for notification services - Resolve object relationships during load (services, bookings, invoices, job cards) - Add controller-level loadSystemData/saveSystemData - Load data at app startup and save on shutdown
18 lines
381 B
C++
18 lines
381 B
C++
#include <cctype>
|
|
#include <string>
|
|
|
|
namespace util
|
|
{
|
|
inline int extractNumber(const std::string& input)
|
|
{
|
|
int result = 0;
|
|
for (char character : input)
|
|
{
|
|
if (std::isdigit(static_cast<unsigned char>(character)))
|
|
{
|
|
result = result * 10 + (character - '0');
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
} |