Storage API
July 1, 2026 ยท View on GitHub
The webcc::storage module provides an interface to the Local Storage API.
Header
#include "webcc/storage.h"
Functions
set_item
Saves a key-value pair to local storage.
void set_item(webcc::string_view key, webcc::string_view value);
get_item
Reads a value from local storage by its key. Returns an empty string if the key does not exist.
webcc::string get_item(webcc::string_view key);
remove_item
Removes an item from local storage by its key.
void remove_item(webcc::string_view key);
clear
Clears all items from local storage.
void clear();