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:
Sergey Gavrilov
2022-10-06 01:15:23 +10:00
committed by GitHub
parent 0f9ea925d3
commit 4bf29827f8
370 changed files with 5597 additions and 3963 deletions

View File

@@ -2,7 +2,6 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <mlib/m-string.h>
#include <storage/storage.h>
#ifdef __cplusplus
@@ -105,7 +104,7 @@ bool stream_delete_and_insert(
* @return true if line lenght is not zero
* @return false otherwise
*/
bool stream_read_line(Stream* stream, string_t str_result);
bool stream_read_line(Stream* stream, FuriString* str_result);
/**
* Moves the rw pointer to the start
@@ -127,7 +126,7 @@ size_t stream_write_char(Stream* stream, char c);
* @param string string value
* @return size_t how many bytes was written
*/
size_t stream_write_string(Stream* stream, string_t string);
size_t stream_write_string(Stream* stream, FuriString* string);
/**
* Write const char* to the stream
@@ -182,7 +181,7 @@ bool stream_insert_char(Stream* stream, char c);
* @return true if the operation was successful
* @return false on error
*/
bool stream_insert_string(Stream* stream, string_t string);
bool stream_insert_string(Stream* stream, FuriString* string);
/**
* Insert const char* to the stream
@@ -231,7 +230,7 @@ bool stream_delete_and_insert_char(Stream* stream, size_t delete_size, char c);
* @return true if the operation was successful
* @return false on error
*/
bool stream_delete_and_insert_string(Stream* stream, size_t delete_size, string_t string);
bool stream_delete_and_insert_string(Stream* stream, size_t delete_size, FuriString* string);
/**
* Delete N chars from the stream and insert const char* to the stream