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:
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <m-string.h>
|
||||
#include <furi.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,7 +11,7 @@ extern "C" {
|
||||
* @param path path string
|
||||
* @param filename output filename string. Must be initialized before.
|
||||
*/
|
||||
void path_extract_filename_no_ext(const char* path, string_t filename);
|
||||
void path_extract_filename_no_ext(const char* path, FuriString* filename);
|
||||
|
||||
/**
|
||||
* @brief Extract filename string from path.
|
||||
@@ -21,7 +20,7 @@ void path_extract_filename_no_ext(const char* path, string_t filename);
|
||||
* @param filename output filename string. Must be initialized before.
|
||||
* @param trim_ext true - get filename without extension
|
||||
*/
|
||||
void path_extract_filename(string_t path, string_t filename, bool trim_ext);
|
||||
void path_extract_filename(FuriString* path, FuriString* filename, bool trim_ext);
|
||||
|
||||
/**
|
||||
* @brief Extract file extension from path.
|
||||
@@ -30,7 +29,7 @@ void path_extract_filename(string_t path, string_t filename, bool trim_ext);
|
||||
* @param ext output extension string
|
||||
* @param ext_len_max maximum extension string length
|
||||
*/
|
||||
void path_extract_extension(string_t path, char* ext, size_t ext_len_max);
|
||||
void path_extract_extension(FuriString* path, char* ext, size_t ext_len_max);
|
||||
|
||||
/**
|
||||
* @brief Extract last path component
|
||||
@@ -38,7 +37,7 @@ void path_extract_extension(string_t path, char* ext, size_t ext_len_max);
|
||||
* @param path path string
|
||||
* @param filename output string. Must be initialized before.
|
||||
*/
|
||||
void path_extract_basename(const char* path, string_t basename);
|
||||
void path_extract_basename(const char* path, FuriString* basename);
|
||||
|
||||
/**
|
||||
* @brief Extract path, except for last component
|
||||
@@ -46,7 +45,7 @@ void path_extract_basename(const char* path, string_t basename);
|
||||
* @param path path string
|
||||
* @param filename output string. Must be initialized before.
|
||||
*/
|
||||
void path_extract_dirname(const char* path, string_t dirname);
|
||||
void path_extract_dirname(const char* path, FuriString* dirname);
|
||||
|
||||
/**
|
||||
* @brief Appends new component to path, adding path delimiter
|
||||
@@ -54,7 +53,7 @@ void path_extract_dirname(const char* path, string_t dirname);
|
||||
* @param path path string
|
||||
* @param suffix path part to apply
|
||||
*/
|
||||
void path_append(string_t path, const char* suffix);
|
||||
void path_append(FuriString* path, const char* suffix);
|
||||
|
||||
/**
|
||||
* @brief Appends new component to path, adding path delimiter
|
||||
@@ -63,7 +62,7 @@ void path_append(string_t path, const char* suffix);
|
||||
* @param suffix second path part
|
||||
* @param out_path output string to combine parts into. Must be initialized
|
||||
*/
|
||||
void path_concat(const char* path, const char* suffix, string_t out_path);
|
||||
void path_concat(const char* path, const char* suffix, FuriString* out_path);
|
||||
|
||||
/**
|
||||
* @brief Check that path contains only ascii characters
|
||||
|
Reference in New Issue
Block a user