The Utility interface provides utility functions. It looks like this:

class UIMGUI_PUBLIC_API Utility
{
public:
    typedef TArray<std::pair<FString, FString>, Keys_COUNT> KeyStringsArrType;

    static FString loadFileToString(const FString& location) noexcept;

    static void sanitiseFilepath(FString& str) noexcept;

    static void keyToText(FString& text, CKeys key, bool bLong) noexcept;
    static FString keyToText(CKeys key, bool bLong) noexcept;
    static void keyToText(FString& text, const InputAction& action, bool bLong) noexcept;
    static FString keyToText(const InputAction& action, bool bLong) noexcept;

    static TVector<FString> splitString(const FString& str, String token) noexcept;

    static void removeConsole() noexcept;

    static FString toLower(String str) noexcept;
    static void toLower(FString& str) noexcept;

    static FString toUpper(String str) noexcept;
    static void toUpper(FString& str) noexcept;

    // Loads a framework context from the plugin's side
    static void loadContext(void* context) noexcept;

    static void sleep(uint64_t milliseconds) noexcept;

    static KeyStringsArrType& getKeyStrings() noexcept;
};

Reference for the functions:

  1. loadFileToString - Loads a file from a given location into an FString. An empty string is an empty file or an error
  2. toUpper - Converts a string to all uppercase characters
  3. toLower - Converts a string to all lowercase characters
  4. splitString - Splits a string using the provided token as a delimiter
  5. removeConsole - Removes the console window on Windows
  6. keyToText - Converts a key code to text in short or long form for usage in UI
  7. sanitiseFilepath - Sanitises file paths, such as replacing \ with / on Windows
  8. loadContext - Loads the framework context inside a plugin. Should be the first thing called from UImGui_Plugin_attach. More info on the plugins page
  9. sleep - Puts the current thread to sleep for X milliseconds
  10. getKeyStrings - Returns the internal string table for each keyboard key. Don't use manually, instead use one of the keyToText functions

Event safety

The whole interface is flagged as event safe at Any time.

C API

The C API is severely downsized, by removing most string operation functions. It uses the standard C API development rules as defined here. It looks like this:

// Event Safety - Any time
UIMGUI_PUBLIC_API UImGui_String UImGui_Utility_loadFileToString(UImGui_String location);

// Event Safety - Any time
UIMGUI_PUBLIC_API UImGui_String UImGui_Utility_sanitiseFilepath(UImGui_String str);

// Event Safety - Any time
UIMGUI_PUBLIC_API UImGui_String UImGui_Utility_keyToText(CKeys key, bool bLong);

// Event Safety - Any time
UIMGUI_PUBLIC_API UImGui_String UImGui_Utility_keyToTextInputAction(UImGui_CInputAction* action, bool bLong);

// Event Safety - Any time
UIMGUI_PUBLIC_API void UImGui_Utility_removeConsole();

// Event Safety - Any time
// Sleep for X milliseconds
UIMGUI_PUBLIC_API void UImGui_Utility_sleep(uint64_t milliseconds);

// Loads a framework context from the plugin's side
UIMGUI_PUBLIC_API void UImGui_Utility_loadContext(void* context);

// Event Safety - Any time
UIMGUI_PUBLIC_API UImGui_String UImGui_Utility_toLower(char* str);
// Event Safety - Any time
UIMGUI_PUBLIC_API UImGui_String UImGui_Utility_toUpper(char* str);

Most functions in the C API are available, except for some that are considered internal and are not needed.