|
CTS-SAT-1-OBC-Firmware
|
#include <stdint.h>#include <stdlib.h>#include "littlefs/lfs.h"#include "littlefs/littlefs_searching.h"#include "littlefs/littlefs_helper.h"
Functions | |
| int32_t | LFS_search_count_occurrences (const char *filename, const uint8_t *needle, size_t needle_len) |
| Count the number of occurrences of a string/byte pattern in an LFS file. | |
| int32_t | LFS_search_find_nth_occurrence (const char *filename, const uint8_t *needle, size_t needle_len, uint16_t n, lfs_soff_t *out_offset) |
| Find the byte offset of the nth occurrence of a string/byte pattern in an LFS file. | |
| int32_t LFS_search_count_occurrences | ( | const char * | filename, |
| const uint8_t * | needle, | ||
| size_t | needle_len ) |
Count the number of occurrences of a string/byte pattern in an LFS file.
| filename | File name/path of the "haystack" file to open and search within. |
| needle | Pattern to search for. |
| needle_len | Length of pattern to search for. |


| int32_t LFS_search_find_nth_occurrence | ( | const char * | filename, |
| const uint8_t * | needle, | ||
| size_t | needle_len, | ||
| uint16_t | n, | ||
| lfs_soff_t * | out_offset ) |
Find the byte offset of the nth occurrence of a string/byte pattern in an LFS file.
| lfs | Filesystem. |
| filename | File name/path of the "haystack" file to open and search within. |
| needle | Pattern to search for. |
| needle_len | Length of pattern to search for. |
| n | Nth occurrence to find. |
| out_offset | Pointer to store the byte offset of the found occurrence. |

