mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
18 lines
317 B
C
18 lines
317 B
C
|
// Luanti
|
||
|
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||
|
// Copyright (C) 2025 cx384
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <string_view>
|
||
|
|
||
|
struct EnumString
|
||
|
{
|
||
|
int num;
|
||
|
const char *str;
|
||
|
};
|
||
|
|
||
|
bool string_to_enum(const EnumString *spec, int &result, std::string_view str);
|
||
|
|
||
|
const char *enum_to_string(const EnumString *spec, int num);
|