M*LIB: non-inlined strings, FuriString primitive (#1795)
* Quicksave 1 * Header stage complete * Source stage complete * Lint & merge fixes * Includes * Documentation step 1 * FBT: output free size considering BT STACK * Documentation step 2 * py lint * Fix music player plugin * unit test stage 1: string allocator, mem, getters, setters, appends, compare, search. * unit test: string equality * unit test: string replace * unit test: string start_with, end_with * unit test: string trim * unit test: utf-8 * Rename * Revert fw_size changes * Simplify CLI backspace handling * Simplify CLI character insert * Merge fixes * Furi: correct filenaming and spelling * Bt: remove furi string include Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -16,15 +16,15 @@ void nfc_scene_generate_info_on_enter(void* context) {
|
||||
dialog_ex_set_right_button_text(dialog_ex, "More");
|
||||
|
||||
// Create info text
|
||||
string_t info_str;
|
||||
string_init_printf(
|
||||
info_str, "%s\n%s\nUID:", nfc->generator->name, nfc_get_dev_type(data->type));
|
||||
FuriString* info_str = furi_string_alloc_printf(
|
||||
"%s\n%s\nUID:", nfc->generator->name, nfc_get_dev_type(data->type));
|
||||
|
||||
// Append UID
|
||||
for(int i = 0; i < data->uid_len; ++i) {
|
||||
string_cat_printf(info_str, " %02X", data->uid[i]);
|
||||
furi_string_cat_printf(info_str, " %02X", data->uid[i]);
|
||||
}
|
||||
nfc_text_store_set(nfc, string_get_cstr(info_str));
|
||||
string_clear(info_str);
|
||||
nfc_text_store_set(nfc, furi_string_get_cstr(info_str));
|
||||
furi_string_free(info_str);
|
||||
|
||||
dialog_ex_set_text(dialog_ex, nfc->text_store, 0, 0, AlignLeft, AlignTop);
|
||||
dialog_ex_set_context(dialog_ex, nfc);
|
||||
|
Reference in New Issue
Block a user