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:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <m-string.h>
|
||||
#include <furi.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -15,7 +15,7 @@ extern "C" {
|
||||
* @return true - success
|
||||
* @return false - arguments string does not contain int
|
||||
*/
|
||||
bool args_read_int_and_trim(string_t args, int* value);
|
||||
bool args_read_int_and_trim(FuriString* args, int* value);
|
||||
|
||||
/**
|
||||
* @brief Extract first argument from arguments string and trim arguments string
|
||||
@@ -25,7 +25,7 @@ bool args_read_int_and_trim(string_t args, int* value);
|
||||
* @return true - success
|
||||
* @return false - arguments string does not contain anything
|
||||
*/
|
||||
bool args_read_string_and_trim(string_t args, string_t word);
|
||||
bool args_read_string_and_trim(FuriString* args, FuriString* word);
|
||||
|
||||
/**
|
||||
* @brief Extract the first quoted argument from the argument string and trim the argument string. If the argument is not quoted, calls args_read_string_and_trim.
|
||||
@@ -35,7 +35,7 @@ bool args_read_string_and_trim(string_t args, string_t word);
|
||||
* @return true - success
|
||||
* @return false - arguments string does not contain anything
|
||||
*/
|
||||
bool args_read_probably_quoted_string_and_trim(string_t args, string_t word);
|
||||
bool args_read_probably_quoted_string_and_trim(FuriString* args, FuriString* word);
|
||||
|
||||
/**
|
||||
* @brief Convert hex ASCII values to byte array
|
||||
@@ -46,7 +46,7 @@ bool args_read_probably_quoted_string_and_trim(string_t args, string_t word);
|
||||
* @return true - success
|
||||
* @return false - arguments string does not contain enough values, or contain non-hex ASCII values
|
||||
*/
|
||||
bool args_read_hex_bytes(string_t args, uint8_t* bytes, size_t bytes_count);
|
||||
bool args_read_hex_bytes(FuriString* args, uint8_t* bytes, size_t bytes_count);
|
||||
|
||||
/************************************ HELPERS ***************************************/
|
||||
|
||||
@@ -56,7 +56,7 @@ bool args_read_hex_bytes(string_t args, uint8_t* bytes, size_t bytes_count);
|
||||
* @param args arguments string
|
||||
* @return size_t length of first word
|
||||
*/
|
||||
size_t args_get_first_word_length(string_t args);
|
||||
size_t args_get_first_word_length(FuriString* args);
|
||||
|
||||
/**
|
||||
* @brief Get length of arguments string
|
||||
@@ -64,7 +64,7 @@ size_t args_get_first_word_length(string_t args);
|
||||
* @param args arguments string
|
||||
* @return size_t length of arguments string
|
||||
*/
|
||||
size_t args_length(string_t args);
|
||||
size_t args_length(FuriString* args);
|
||||
|
||||
/**
|
||||
* @brief Convert ASCII hex values to byte
|
||||
|
Reference in New Issue
Block a user