Synchronize the utf string with the latest string changes.
I noticed that some of the disable macros are not used and should be for the private functions.
The *seek* functions needed to be fixed in string.
Add a missing *seek* function.
extern "C" {
#endif
-#if !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) || !defined(f_string_map_multis_append) || !defined(f_string_maps_append)
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_mash_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_triples_append_)
f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
if (destination->used + length > destination->size) {
return F_none;
}
-#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) || !defined(f_string_map_multis_append) || !defined(f_string_maps_append)
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_mash_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_triples_append_)
-#if !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
+#if !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
if (destination->used + length > f_array_length_t_size) {
return F_none;
}
-#endif // !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
+#endif // !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
-#if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_)
+#if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *dynamic) {
f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(f_string_t), (void **) & dynamic->string);
return status;
}
-#endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_)
+#endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
-#if !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_)
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *dynamic) {
if (dynamic->used + amount > dynamic->size) {
return F_data_not;
}
-#endif // !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_)
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
-#if !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_)
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *dynamic) {
const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(f_string_t), (void **) & dynamic->string);
return status;
}
-#endif // !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_)
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
-#if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_decimate_by_)
+#if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
f_status_t private_f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t *dynamics) {
if (dynamics->used + length > f_array_length_t_size) {
return status;
}
-#endif // !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_decimate_by_)
+#endif // !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
#if !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_)
f_status_t private_f_string_dynamics_append(const f_string_dynamics_t source, f_string_dynamics_t *destination) {
* @see memcpy()
*
* @see f_string_append()
+ * @see f_string_append_assure()
* @see f_string_dynamic_append()
+ * @see f_string_dynamic_append_assure()
* @see f_string_dynamic_mash()
+ * @see f_string_dynamic_partial_append)
+ * @see f_string_dynamic_partial_append_assure()
+ * @see f_string_dynamic_partial_mash()
+ * @see f_string_dynamics_append()
* @see f_string_map_multis_append()
- * @see f_string_maps_append()
* @see f_string_mash()
+ * @see f_string_maps_append()
+ * @see f_string_triples_append()
*/
-#if !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) || !defined(f_string_map_multis_append) || !defined(f_string_maps_append)
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_mash_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_triples_append_)
extern f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) || !defined(f_string_map_multis_append) || !defined(f_string_maps_append)
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_mash_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_triples_append_)
/**
* Private implementation of f_string_append_nulless().
*
* @see memcpy()
*
- * @see f_macro_string_dynamic_t_resize()
+ * @see f_string_append_assure_nulless()
* @see f_string_append_nulless()
+ * @see f_string_dynamic_append_assure_nulless()
* @see f_string_dynamic_append_nulless()
* @see f_string_dynamic_mash_nulless()
+ * @see f_string_dynamic_partial_append_assure_nulless()
+ * @see f_string_dynamic_partial_append_nulless()
+ * @see f_string_dynamic_partial_mash_nulless()
* @see f_string_mash_nulless()
*/
-#if !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
+#if !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
extern f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
+#endif // !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
/**
* Private implementation for resizing.
* @see f_memory_adjust()
* @see f_string_dynamic_adjust()
* @see f_string_dynamic_decimate_by()
+ * @see f_string_dynamics_adjust()
+ * @see f_string_dynamics_append()
+ * @see f_string_dynamics_decimate_by()
+ * @see f_string_map_multis_adjust()
+ * @see f_string_map_multis_append()
+ * @see f_string_triples_adjust()
+ * @see f_string_triples_decimate_by()
*/
-#if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_)
+#if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
extern f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_)
+#endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
/**
* Private implementation of f_string_dynamic_increase_by().
* @see memcpy()
*
* @see f_string_append()
+ * @see f_string_append_assure()
* @see f_string_append_mash()
* @see f_string_append_nulless()
* @see f_string_dynamic_append()
+ * @see f_string_dynamic_append_assure()
* @see f_string_dynamic_append_nulless()
* @see f_string_dynamic_increase_by()
* @see f_string_dynamic_mash()
* @see f_string_dynamic_mash_nulless()
+ * @see f_string_dynamic_partial_append)
+ * @see f_string_dynamic_partial_append_assure()
+ * @see f_string_dynamic_partial_mash()
* @see f_string_dynamic_prepend()
* @see f_string_dynamic_prepend_nulless()
+ * @see f_string_dynamics_append()
+ * @see f_string_map_multis_append()
+ * @see f_string_mash()
* @see f_string_mash_nulless()
+ * @see f_string_maps_append()
* @see f_string_prepend()
* @see f_string_prepend_nulless()
+ * @see f_string_triples_append()
*/
-#if !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_)
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
extern f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_)
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
/**
* Private implementation for resizing.
* Errors (with error bit) from: f_memory_resize().
*
* @see f_memory_resize()
+ * @see f_string_append()
+ * @see f_string_append_assure()
+ * @see f_string_append_mash()
+ * @see f_string_append_nulless()
+ * @see f_string_dynamic_append()
+ * @see f_string_dynamic_append_assure()
+ * @see f_string_dynamic_append_nulless()
* @see f_string_dynamic_decrease_by()
* @see f_string_dynamic_increase()
* @see f_string_dynamic_increase_by()
+ * @see f_string_dynamic_mash()
+ * @see f_string_dynamic_mash_nulless()
+ * @see f_string_dynamic_partial_append)
+ * @see f_string_dynamic_partial_append_assure()
+ * @see f_string_dynamic_partial_mash()
+ * @see f_string_dynamic_prepend()
+ * @see f_string_dynamic_prepend_nulless()
* @see f_string_dynamic_terminate()
* @see f_string_dynamic_terminate_after()
+ * @see f_string_dynamics_append()
+ * @see f_string_map_multis_append()
+ * @see f_string_mash_nulless()
+ * @see f_string_mash()
+ * @see f_string_maps_append()
+ * @see f_string_prepend()
+ * @see f_string_prepend_nulless()
+ * @see f_string_triples_append()
*/
-#if !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_)
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
extern f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_)
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
/**
* Private implementation for resizing.
*
* @see f_memory_adjust()
* @see f_string_dynamics_adjust()
+ * @see f_string_dynamics_append()
* @see f_string_dynamics_decimate_by()
+ * @see f_string_map_multis_adjust()
+ * @see f_string_map_multis_append()
*/
-#if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_decimate_by_)
+#if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
extern f_status_t private_f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t *strings) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_decimate_by_)
+#endif // !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
/**
* Private implementation for appending.
#endif // _di_level_0_parameter_checking_
if (!length) return F_data_not_eos;
- if (destination->used < length) return private_f_string_prepend(source, length, destination);
+
+ if (destination->used < length) {
+ return private_f_string_prepend(source, length, destination);
+ }
f_array_length_t i = 0;
f_array_length_t j = 0;
while (i < length && j < destination->used) {
+
if (!source[i]) {
i++;
continue;
continue;
}
- if (source[i] != destination->string[i]) return private_f_string_prepend(source, length, destination);
+ if (source[i] != destination->string[i]) {
+ return private_f_string_prepend(source, length, destination);
+ }
i++;
j++;
#endif // _di_level_0_parameter_checking_
if (!length) return F_data_not_eos;
- if (destination->used < length) return private_f_string_prepend_nulless(source, length, destination);
+
+ if (destination->used < length) {
+ return private_f_string_prepend_nulless(source, length, destination);
+ }
f_array_length_t i = 0;
f_array_length_t j = 0;
while (i < length && j < destination->used) {
+
if (!source[i]) {
i++;
continue;
continue;
}
- if (source[i] != destination->string[i]) return private_f_string_prepend_nulless(source, length, destination);
+ if (source[i] != destination->string[i]) {
+ return private_f_string_prepend_nulless(source, length, destination);
+ }
i++;
j++;
}
#endif // _di_f_string_prepend_nulless_
+#ifndef _di_f_string_seek_line_
+ f_status_t f_string_seek_line(const f_string_t string, f_string_range_t *range) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!range) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (range->start > range->stop) return F_data_not_stop;
+
+ while (string[range->start] != f_string_eol_s[0]) {
+ range->start++;
+
+ if (range->start > range->stop) return F_none_stop;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_string_seek_line_
+
#ifndef _di_f_string_seek_line_to_
f_status_t f_string_seek_line_to(const f_string_t string, const int8_t seek_to, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
#endif // _di_f_string_prepend_nulless_
/**
+ * Seek the string location forward until EOL is reached.
+ *
+ * @param string
+ * The string to traverse.
+ * @param range
+ * A range within the buffer representing the start and stop locations.
+ * The start location will be incremented by seek.
+ *
+ * @return
+ * F_none on success.
+ * F_none_stop on success, but stopped at end of range.
+ * F_data_not_stop on success, but the range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_seek_line_
+ extern f_status_t f_string_seek_line(const f_string_t string, f_string_range_t *range);
+#endif // _di_f_string_seek_line_
+
+/**
* Seek the string location forward until the character (1-byte wide) or EOL is reached.
*
* @param string
#endif // _di_f_string_dynamic_prepend_nulless_
#ifndef _di_f_string_dynamic_resize_
- f_status_t f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *dynamic) {
+ f_status_t f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
- if (!dynamic) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- return private_f_string_dynamic_resize(length, dynamic);
+ return private_f_string_dynamic_resize(length, buffer);
}
#endif // _di_f_string_dynamic_resize_
#ifndef _di_f_string_dynamic_seek_line_
- f_status_t f_string_dynamic_seek_line(const f_string_t string, f_string_range_t *range) {
+ f_status_t f_string_dynamic_seek_line(const f_string_static_t buffer, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!string) return F_data_not;
+ if (!buffer.used) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- while (string[range->start] != f_string_eol_s[0]) {
+ while (buffer.string[range->start] != f_string_eol_s[0]) {
range->start++;
+ if (range->start >= buffer.used) return F_none_eos;
if (range->start > range->stop) return F_none_stop;
} // while
#endif // _di_f_string_dynamic_seek_line_
#ifndef _di_f_string_dynamic_seek_line_to_
- f_status_t f_string_dynamic_seek_line_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range) {
+ f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const int8_t seek_to_this, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!string) return F_data_not;
+ if (!buffer.used) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- while (string[range->start] != seek_to_this) {
+ while (buffer.string[range->start] != seek_to_this) {
- if (string[range->start] == f_string_eol_s[0]) return F_none_eol;
+ if (buffer.string[range->start] == f_string_eol_s[0]) return F_none_eol;
range->start++;
+ if (range->start >= buffer.used) return F_none_eos;
if (range->start > range->stop) return F_none_stop;
} // while
#endif // _di_f_string_dynamic_seek_line_to_
#ifndef _di_f_string_dynamic_seek_to_
- f_status_t f_string_dynamic_seek_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range) {
+ f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const int8_t seek_to_this, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!string) return F_data_not;
+ if (!buffer.used) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- while (string[range->start] != seek_to_this) {
+ while (buffer.string[range->start] != seek_to_this) {
range->start++;
+ if (range->start >= buffer.used) return F_none_eos;
if (range->start > range->stop) return F_none_stop;
} // while
*
* @param length
* The new size to use.
- * @param dynamic
+ * @param buffer
* The string to resize.
*
* @return
* Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamic_resize_
- extern f_status_t f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *dynamic);
+ extern f_status_t f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *buffer);
#endif // _di_f_string_dynamic_resize_
/**
* Seek the buffer location forward until EOL is reached.
*
- * @param string
- * The string to traverse.
+ * @param buffer
+ * The buffer to traverse.
* @param range
* A range within the buffer representing the start and stop locations.
* The start location will be incremented by seek.
*
* @return
* F_none on success.
+ * F_none_eos on success, but stopped at end of string.
* F_none_stop on success, but stopped at end of range.
- * F_data_not on success, but there was no string data to seek.
+ * F_data_not_eos on success, but there was no string data to seek.
* F_data_not_stop on success, but the range.start > range.stop.
*
* F_parameter (with error bit) if a parameter is invalid.
* Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamic_seek_line_
- extern f_status_t f_string_dynamic_seek_line(const f_string_t string, f_string_range_t *range);
+ extern f_status_t f_string_dynamic_seek_line(const f_string_static_t buffer, f_string_range_t *range);
#endif // _di_f_string_dynamic_seek_line_
/**
* Seek the buffer location forward until the character (1-byte wide) or EOL is reached.
*
- * @param string
- * The string to traverse.
+ * @param buffer
+ * The buffer to traverse.
* @param seek_to_this
* A single-width character representing a character to seek to.
* @param range
*
* @return
* F_none on success.
- * F_none_eol on success, but stopped at EOL.
+ * F_none_eos on success, but stopped at end of string.
* F_none_stop on success, but stopped at end of range.
- * F_data_not on success, but there was no string data to seek.
+ * F_data_not_eos on success, but there was no string data to seek.
* F_data_not_stop on success, but the range.start > range.stop.
*
* F_parameter (with error bit) if a parameter is invalid.
* Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamic_seek_line_to_
- extern f_status_t f_string_dynamic_seek_line_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range);
+ extern f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const int8_t seek_to_this, f_string_range_t *range);
#endif // _di_f_string_dynamic_seek_line_to_
/**
* Seek the buffer location forward until the character (1-byte wide) is reached.
*
- * @param string
- * The string to traverse.
+ * @param buffer
+ * The buffer to traverse.
* @param seek_to_this
* A single-width character representing a character to seek to.
* @param range
*
* @return
* F_none on success.
+ * F_none_eos on success, but stopped at end of string.
* F_none_stop on success, but stopped at end of range.
- * F_data_not on success, but there was no string data to seek.
+ * F_data_not_eos on success, but there was no string data to seek.
* F_data_not_stop on success, but the range.start > range.stop.
*
- * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
- * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamic_seek_to_
- extern f_status_t f_string_dynamic_seek_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range);
+ extern f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const int8_t seek_to_this, f_string_range_t *range);
#endif // _di_f_string_dynamic_seek_to_
/**
}
#endif // !defined(_di_f_utf_character_is_zero_width_) || !defined(_di_f_utf_is_zero_width_)
-#if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_)
+#if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_triples_append_)
f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
if (destination->used + length > destination->size) {
return F_none;
}
-#endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_)
+#endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_triples_append_)
-#if !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
+#if !defined(_di_f_utf_string_append_assure_nulless_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
if (destination->used + length > f_array_length_t_size) {
return F_none;
}
-#endif // !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
+#endif // !defined(_di_f_utf_string_append_assure_nulless_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
-#if !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_)
+#if !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) || !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_)
f_status_t private_f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) {
f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(f_utf_string_t), (void **) & dynamic->string);
return status;
}
-#endif // !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_)
+#endif // !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) || !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_)
-#if !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_)
+#if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_)
f_status_t private_f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic) {
if (dynamic->used + amount > dynamic->size) {
return F_data_not;
}
-#endif // !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_)
+#endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_)
-#if !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_)
+#if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_)
f_status_t private_f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) {
const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(f_utf_string_t), (void **) & dynamic->string);
return status;
}
-#endif // !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_)
+#endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_)
-#if !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_decimate_by_)
+#if !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_)
f_status_t private_f_utf_string_dynamics_adjust(const f_array_length_t length, f_utf_string_dynamics_t *dynamics) {
+
+ if (dynamics->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < dynamics->size; ++i) {
return status;
}
-#endif // !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_decimate_by_)
+#endif // !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_)
+
+#if !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_)
+ f_status_t private_f_utf_string_dynamics_append(const f_utf_string_dynamics_t source, f_utf_string_dynamics_t *destination) {
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_utf_string_dynamics_adjust(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].used = 0;
+
+ if (source.array[i].used) {
+ status = private_f_utf_string_append(source.array[i].string, source.array[i].used, &destination->array[destination->used]);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+
+ return F_none;
+ }
+#endif // !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_)
#if !defined(_di_f_utf_string_dynamics_decrease_by_) || !defined(_di_f_utf_string_dynamics_increase_) || !defined(_di_f_utf_string_dynamics_increase_by_)
f_status_t private_f_utf_string_dynamics_resize(const f_array_length_t length, f_utf_string_dynamics_t *dynamics) {
+
+ if (dynamics->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < dynamics->size; ++i) {
#if !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_decimate_by_)
f_status_t private_f_utf_string_map_multis_adjust(const f_array_length_t length, f_utf_string_map_multis_t *map_multis) {
+
+ if (map_multis->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < map_multis->size; ++i) {
#if !defined(_di_f_utf_string_map_multis_decrease_by_) || !defined(_di_f_utf_string_map_multis_increase_) || !defined(_di_f_utf_string_map_multis_increase_by_) || !defined(_di_f_utf_string_map_multis_terminate_) || !defined(_di_f_utf_string_map_multis_terminate_after_)
f_status_t private_f_utf_string_map_multis_resize(const f_array_length_t length, f_utf_string_map_multis_t *map_multis) {
+
+ if (map_multis->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < map_multis->size; ++i) {
#if !defined(_di_f_utf_string_maps_adjust_) || !defined(_di_f_utf_string_maps_decimate_by_)
f_status_t private_f_utf_string_maps_adjust(const f_array_length_t length, f_utf_string_maps_t *maps) {
+
+ if (maps->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < maps->size; ++i) {
#if !defined(_di_f_utf_string_maps_decrease_by_) || !defined(_di_f_utf_string_maps_increase_) || !defined(_di_f_utf_string_maps_increase_by_) || !defined(_di_f_utf_string_maps_terminate_) || !defined(_di_f_utf_string_maps_terminate_after_)
f_status_t private_f_utf_string_maps_resize(const f_array_length_t length, f_utf_string_maps_t *maps) {
+
+ if (maps->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < maps->size; ++i) {
#if !defined(_di_f_utf_string_quantitys_adjust_) || !defined(_di_f_utf_string_quantitys_decimate_by_)
f_status_t private_f_utf_string_quantitys_adjust(const f_array_length_t length, f_utf_string_quantitys_t *quantitys) {
+ if (quantitys->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
const f_status_t status = f_memory_adjust(quantitys->size, length, sizeof(f_utf_string_quantity_t), (void **) & quantitys->array);
if (F_status_is_error_not(status)) {
#if !defined(_di_f_utf_string_quantitys_decrease_) || !defined(_di_f_utf_string_quantitys_decrease_by_) || !defined(_di_f_utf_string_quantitys_increase_) || !defined(_di_f_utf_string_quantitys_increase_by_) || !defined(_di_f_utf_string_quantitys_terminate_) || !defined(_di_f_utf_string_quantitys_terminate_after_)
f_status_t private_f_utf_string_quantitys_resize(const f_array_length_t length, f_utf_string_quantitys_t *quantitys) {
+ if (quantitys->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
const f_status_t status = f_memory_resize(quantitys->size, length, sizeof(f_utf_string_quantity_t), (void **) & quantitys->array);
if (F_status_is_error_not(status)) {
#if !defined(_di_f_utf_string_quantityss_adjust_) || !defined(_di_f_utf_string_quantityss_decimate_by_)
f_status_t private_f_utf_string_quantityss_adjust(const f_array_length_t length, f_utf_string_quantityss_t *quantityss) {
+
+ if (quantityss->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < quantityss->size; ++i) {
#if !defined(_di_f_utf_string_quantityss_decrease_) || !defined(_di_f_utf_string_quantityss_decrease_by_) || !defined(_di_f_utf_string_quantityss_increase_) || !defined(_di_f_utf_string_quantityss_increase_by_) || !defined(_di_f_utf_string_quantityss_terminate_) || !defined(_di_f_utf_string_quantityss_terminate_after_)
f_status_t private_f_utf_string_quantityss_resize(const f_array_length_t length, f_utf_string_quantityss_t *quantityss) {
+
+ if (quantityss->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < quantityss->size; ++i) {
#if !defined(_di_f_utf_string_ranges_adjust_) || !defined(_di_f_utf_string_ranges_decimate_by_)
f_status_t private_f_utf_string_ranges_adjust(const f_array_length_t length, f_utf_string_ranges_t *ranges) {
+ if (ranges->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
const f_status_t status = f_memory_adjust(ranges->size, length, sizeof(f_utf_string_range_t), (void **) & ranges->array);
if (F_status_is_error_not(status)) {
#if !defined(_di_f_utf_string_ranges_decrease_) || !defined(_di_f_utf_string_ranges_decrease_by_) || !defined(_di_f_utf_string_ranges_increase_) || !defined(_di_f_utf_string_ranges_increase_by_) || !defined(_di_f_utf_string_ranges_terminate_) || !defined(_di_f_utf_string_ranges_terminate_after_)
f_status_t private_f_utf_string_ranges_resize(const f_array_length_t length, f_utf_string_ranges_t *ranges) {
+ if (ranges->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
const f_status_t status = f_memory_resize(ranges->size, length, sizeof(f_utf_string_range_t), (void **) & ranges->array);
if (F_status_is_error_not(status)) {
#if !defined(_di_f_utf_string_rangess_adjust_) || !defined(_di_f_utf_string_rangess_decimate_by_)
f_status_t private_f_utf_string_rangess_adjust(const f_array_length_t length, f_utf_string_rangess_t *rangess) {
+
+ if (rangess->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < rangess->size; ++i) {
#if !defined(_di_f_utf_string_rangess_decrease_) || !defined(_di_f_utf_string_rangess_decrease_by_) || !defined(_di_f_utf_string_rangess_increase_) || !defined(_di_f_utf_string_rangess_increase_by_) || !defined(_di_f_utf_string_rangess_terminate_) || !defined(_di_f_utf_string_rangess_terminate_after_)
f_status_t private_f_utf_string_rangess_resize(const f_array_length_t length, f_utf_string_rangess_t *rangess) {
+
+ if (rangess->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < rangess->size; ++i) {
#if !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_)
f_status_t private_f_utf_string_triples_adjust(const f_array_length_t length, f_utf_string_triples_t *triples) {
+
+ if (triples->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < triples->size; ++i) {
#if !defined(_di_f_utf_string_triples_decrease_) || !defined(_di_f_utf_string_triples_decrease_by_) || !defined(_di_f_utf_string_triples_increase_) || !defined(_di_f_utf_string_triples_increase_by_) || !defined(_di_f_utf_string_triples_terminate_) || !defined(_di_f_utf_string_triples_terminate_after_)
f_status_t private_f_utf_string_triples_resize(const f_array_length_t length, f_utf_string_triples_t *triples) {
+
+ if (triples->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < triples->size; ++i) {
*
* @return
* F_none on success.
- * F_data_not if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
*
- * @return
- * F_none on success.
+ * F_string_too_large (with error bit) if the combined string is too large.
*
- * Errors (with error bit) from: private_f_utf_string_dynamic_increase_by().
+ * Errors (with error bit) from: f_memory_resize().
*
* @see memcpy()
*
* @see f_utf_string_append()
+ * @see f_utf_string_append_assure()
* @see f_utf_string_dynamic_append()
+ * @see f_utf_string_dynamic_append_assure()
* @see f_utf_string_dynamic_mash()
+ * @see f_utf_string_dynamic_partial_append)
+ * @see f_utf_string_dynamic_partial_append_assure()
+ * @see f_utf_string_dynamic_partial_mash()
+ * @see f_utf_string_dynamics_append()
+ * @see f_utf_string_map_multis_append()
* @see f_utf_string_mash()
- *
- * @see private_f_utf_string_dynamic_increase_by()
+ * @see f_utf_string_maps_append()
+ * @see f_utf_string_triples_append()
*/
-#if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_)
+#if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_triples_append_)
extern f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_)
+#endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_triples_append_)
/**
* Private implementation of f_utf_string_append_nulless().
* @return
* F_none on success.
*
- * Errors (with error bit) from: private_f_utf_string_dynamic_increase_by().
+ * F_string_too_large (with error bit) if the combined string is too large.
*
* @see memcpy()
*
- * @see f_macro_utf_string_dynamic_t_resize()
+ * @see f_utf_string_append_assure_nulless()
* @see f_utf_string_append_nulless()
+ * @see f_utf_string_dynamic_append_assure_nulless()
* @see f_utf_string_dynamic_append_nulless()
* @see f_utf_string_dynamic_mash_nulless()
+ * @see f_utf_string_dynamic_partial_append_assure_nulless()
+ * @see f_utf_string_dynamic_partial_append_nulless()
+ * @see f_utf_string_dynamic_partial_mash_nulless()
* @see f_utf_string_mash_nulless()
- *
- * @see private_f_utf_string_dynamic_increase_by()
*/
-#if !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
+#if !defined(_di_f_utf_string_append_assure_nulless_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
extern f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
+#endif // !defined(_di_f_utf_string_append_assure_nulless_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
/**
* Private implementation for resizing.
* @see f_memory_adjust()
* @see f_utf_string_dynamic_adjust()
* @see f_utf_string_dynamic_decimate_by()
+ * @see f_utf_string_dynamics_adjust()
+ * @see f_utf_string_dynamics_append()
+ * @see f_utf_string_dynamics_decimate_by()
+ * @see f_utf_string_map_multis_adjust()
+ * @see f_utf_string_map_multis_append()
+ * @see f_utf_string_triples_adjust()
+ * @see f_utf_string_triples_decimate_by()
*/
-#if !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_)
+#if !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) || !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_)
extern f_status_t private_f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_)
+#endif // !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) || !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_)
/**
* Private implementation of f_utf_string_dynamic_increase_by().
* @return
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
* F_string_too_large (with error bit) if the combined string is too large.
*
- * Errors (with error bit) from: private_f_utf_string_dynamic_resize().
+ * Errors (with error bit) from: f_memory_resize().
*
* @see memcpy()
*
* @see f_utf_string_append()
+ * @see f_utf_string_append_assure()
* @see f_utf_string_append_mash()
* @see f_utf_string_append_nulless()
* @see f_utf_string_dynamic_append()
+ * @see f_utf_string_dynamic_append_assure()
* @see f_utf_string_dynamic_append_nulless()
* @see f_utf_string_dynamic_increase_by()
* @see f_utf_string_dynamic_mash()
* @see f_utf_string_dynamic_mash_nulless()
+ * @see f_utf_string_dynamic_partial_append)
+ * @see f_utf_string_dynamic_partial_append_assure()
+ * @see f_utf_string_dynamic_partial_mash()
* @see f_utf_string_dynamic_prepend()
* @see f_utf_string_dynamic_prepend_nulless()
+ * @see f_utf_string_dynamics_append()
+ * @see f_utf_string_map_multis_append()
+ * @see f_utf_string_mash()
* @see f_utf_string_mash_nulless()
+ * @see f_utf_string_maps_append()
* @see f_utf_string_prepend()
* @see f_utf_string_prepend_nulless()
+ * @see f_utf_string_triples_append()
*/
-#if !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_)
+#if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_)
extern f_status_t private_f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_)
+#endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_)
/**
* Private implementation for resizing.
* Errors (with error bit) from: f_memory_resize().
*
* @see f_memory_resize()
+ * @see f_utf_string_append()
+ * @see f_utf_string_append_assure()
+ * @see f_utf_string_append_mash()
+ * @see f_utf_string_append_nulless()
+ * @see f_utf_string_dynamic_append()
+ * @see f_utf_string_dynamic_append_assure()
+ * @see f_utf_string_dynamic_append_nulless()
* @see f_utf_string_dynamic_decrease_by()
* @see f_utf_string_dynamic_increase()
* @see f_utf_string_dynamic_increase_by()
+ * @see f_utf_string_dynamic_mash()
+ * @see f_utf_string_dynamic_mash_nulless()
+ * @see f_utf_string_dynamic_partial_append)
+ * @see f_utf_string_dynamic_partial_append_assure()
+ * @see f_utf_string_dynamic_partial_mash()
+ * @see f_utf_string_dynamic_prepend()
+ * @see f_utf_string_dynamic_prepend_nulless()
* @see f_utf_string_dynamic_terminate()
* @see f_utf_string_dynamic_terminate_after()
+ * @see f_utf_string_dynamics_append()
+ * @see f_utf_string_map_multis_append()
+ * @see f_utf_string_mash_nulless()
+ * @see f_utf_string_mash()
+ * @see f_utf_string_maps_append()
+ * @see f_utf_string_prepend()
+ * @see f_utf_string_prepend_nulless()
+ * @see f_utf_string_triples_append()
*/
-#if !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_)
+#if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_)
extern f_status_t private_f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_)
+#endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_)
/**
* Private implementation for resizing.
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_utf_string_dynamics_adjust()
+ * @see f_utf_string_dynamics_append()
* @see f_utf_string_dynamics_decimate_by()
- *
- * @see private_f_utf_string_dynamic_adjust()
+ * @see f_utf_string_map_multis_adjust()
+ * @see f_utf_string_map_multis_append()
*/
-#if !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_decimate_by_)
+#if !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_)
extern f_status_t private_f_utf_string_dynamics_adjust(const f_array_length_t length, f_utf_string_dynamics_t *strings) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_decimate_by_)
+#endif // !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_)
+
+/**
+ * Private implementation for appending.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ * The source strings to append.
+ * @param destination
+ * The destination strings the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
+ * Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see f_utf_string_dynamics_append()
+ * @see f_utf_string_map_multis_append()
+ */
+#if !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_)
+ extern f_status_t private_f_utf_string_dynamics_append(const f_utf_string_dynamics_t source, f_utf_string_dynamics_t *destination) f_gcc_attribute_visibility_internal;
+#endif // !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_)
/**
* Private implementation for resizing.
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_utf_string_dynamic_resize().
*
* @see f_memory_resize()
* @see f_utf_string_dynamics_decrease_by()
* @see f_utf_string_dynamics_increase()
* @see f_utf_string_dynamics_increase_by()
- *
- * @see private_f_utf_string_dynamic_resize()
*/
#if !defined(_di_f_utf_string_dynamics_decrease_by_) || !defined(_di_f_utf_string_dynamics_increase_) || !defined(_di_f_utf_string_dynamics_increase_by_)
extern f_status_t private_f_utf_string_dynamics_resize(const f_array_length_t length, f_utf_string_dynamics_t *strings) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_utf_string_map_multis_adjust()
- *
- * @see private_f_utf_string_dynamic_adjust()
*/
#if !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_decimate_by_)
extern f_status_t private_f_utf_string_map_multis_adjust(const f_array_length_t length, f_utf_string_map_multis_t *map_multis) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_utf_string_dynamic_resize().
*
* @see f_memory_adjust()
* @see f_utf_string_map_multis_decrease_by()
* @see f_utf_string_map_multis_increase_by()
* @see f_utf_string_map_multis_terminate()
* @see f_utf_string_map_multis_terminate_after()
- *
- * @see private_f_utf_string_dynamic_resize()
*/
#if !defined(_di_f_utf_string_map_multis_decrease_by_) || !defined(_di_f_utf_string_map_multis_increase_) || !defined(_di_f_utf_string_map_multis_increase_by_) || !defined(_di_f_utf_string_map_multis_terminate_) || !defined(_di_f_utf_string_map_multis_terminate_after_)
extern f_status_t private_f_utf_string_map_multis_resize(const f_array_length_t length, f_utf_string_map_multis_t *map_multis) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_utf_string_maps_adjust()
- *
- * @see private_f_utf_string_dynamic_adjust()
*/
#if !defined(_di_f_utf_string_maps_adjust_) || !defined(_di_f_utf_string_maps_decimate_by_)
extern f_status_t private_f_utf_string_maps_adjust(const f_array_length_t length, f_utf_string_maps_t *maps) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_utf_string_dynamic_resize().
*
* @see f_memory_adjust()
* @see f_utf_string_maps_decrease_by()
* @see f_utf_string_maps_increase_by()
* @see f_utf_string_maps_terminate()
* @see f_utf_string_maps_terminate_after()
- *
- * @see private_f_utf_string_dynamic_resize()
*/
#if !defined(_di_f_utf_string_maps_decrease_by_) || !defined(_di_f_utf_string_maps_increase_) || !defined(_di_f_utf_string_maps_increase_by_) || !defined(_di_f_utf_string_maps_terminate_) || !defined(_di_f_utf_string_maps_terminate_after_)
extern f_status_t private_f_utf_string_maps_resize(const f_array_length_t length, f_utf_string_maps_t *maps) f_gcc_attribute_visibility_internal;
*
* @return
* F_none on success.
+ *
* F_string_too_large (with error bit) if the combined string is too large.
*
- * Errors (with error bit) from: private_f_utf_string_dynamic_increase_by().
+ * Errors (with error bit) from: f_memory_resize().
*
* @see memcopy()
* @see memmove()
* @see f_utf_string_mish()
* @see f_utf_string_prepend_assure()
* @see f_utf_string_prepend()
- *
- * @see private_f_utf_string_dynamic_increase_by()
*/
#if !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_)
extern f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
*
* @return
* F_none on success.
+ *
* F_string_too_large (with error bit) if the combined string is too large.
*
- * Errors (with error bit) from: private_f_utf_string_dynamic_increase_by().
+ * Errors (with error bit) from: f_memory_resize().
*
* @see memcopy()
* @see memmove()
* @see f_utf_string_mish_nulless()
* @see f_utf_string_prepend_assure_nulless()
* @see f_utf_string_prepend_nulless()
- *
- * @see private_f_utf_string_dynamic_increase_by()
*/
#if !defined(_di_f_utf_string_dynamic_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_mish_nulless_) || !defined(_di_f_utf_string_prepend_assure_nulless_) || !defined(_di_f_utf_string_prepend_nulless_)
extern f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_utf_string_quantitys_adjust()
* @see f_utf_string_quantitys_decimate_by()
- * @see private_f_utf_string_dynamic_adjust()
*/
#if !defined(_di_f_utf_string_quantitys_adjust_) || !defined(_di_f_utf_string_quantitys_decimate_by_)
extern f_status_t private_f_utf_string_quantitys_adjust(const f_array_length_t length, f_utf_string_quantitys_t *quantitys) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_resize()
* @see f_utf_string_quantitys_decrease_by()
* @see f_utf_string_quantitys_increase_by()
* @see f_utf_string_quantitys_terminate()
* @see f_utf_string_quantitys_terminate_after()
- * @see private_f_utf_string_dynamic_resize()
*/
#if !defined(_di_f_utf_string_quantitys_decrease_by_) || !defined(_di_f_utf_string_quantitys_increase_) || !defined(_di_f_utf_string_quantitys_increase_by_) || !defined(_di_f_utf_string_quantitys_terminate_) || !defined(_di_f_utf_string_quantitys_terminate_after_)
extern f_status_t private_f_utf_string_quantitys_resize(const f_array_length_t length, f_utf_string_quantitys_t *quantitys) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_utf_string_quantityss_adjust()
* @see f_utf_string_quantityss_decimate_by()
- * @see private_f_utf_string_dynamic_adjust()
*/
#if !defined(_di_f_utf_string_quantityss_adjust_) || !defined(_di_f_utf_string_quantityss_decimate_by_)
extern f_status_t private_f_utf_string_quantityss_adjust(const f_array_length_t length, f_utf_string_quantityss_t *quantityss) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_resize()
* @see f_utf_string_quantityss_decrease_by()
* @see f_utf_string_quantityss_increase_by()
* @see f_utf_string_quantityss_terminate()
* @see f_utf_string_quantityss_terminate_after()
- * @see private_f_utf_string_dynamic_resize()
*/
#if !defined(_di_f_utf_string_quantityss_decrease_by_) || !defined(_di_f_utf_string_quantityss_increase_) || !defined(_di_f_utf_string_quantityss_increase_by_) || !defined(_di_f_utf_string_quantityss_terminate_) || !defined(_di_f_utf_string_quantityss_terminate_after_)
extern f_status_t private_f_utf_string_quantityss_resize(const f_array_length_t length, f_utf_string_quantityss_t *quantityss) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_utf_string_ranges_adjust()
* @see f_utf_string_ranges_decimate_by()
- * @see private_f_utf_string_dynamic_adjust()
*/
#if !defined(_di_f_utf_string_ranges_adjust_) || !defined(_di_f_utf_string_ranges_decimate_by_)
extern f_status_t private_f_utf_string_ranges_adjust(const f_array_length_t length, f_utf_string_ranges_t *ranges) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_resize()
* @see f_utf_string_ranges_decrease_by()
* @see f_utf_string_ranges_increase_by()
* @see f_utf_string_ranges_terminate()
* @see f_utf_string_ranges_terminate_after()
- * @see private_f_utf_string_dynamic_resize()
*/
#if !defined(_di_f_utf_string_ranges_decrease_by_) || !defined(_di_f_utf_string_ranges_increase_) || !defined(_di_f_utf_string_ranges_increase_by_) || !defined(_di_f_utf_string_ranges_terminate_) || !defined(_di_f_utf_string_ranges_terminate_after_)
extern f_status_t private_f_utf_string_ranges_resize(const f_array_length_t length, f_utf_string_ranges_t *ranges) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_utf_string_rangess_adjust()
* @see f_utf_string_rangess_decimate_by()
- * @see private_f_utf_string_dynamic_adjust()
*/
#if !defined(_di_f_utf_string_rangess_adjust_) || !defined(_di_f_utf_string_rangess_decimate_by_)
extern f_status_t private_f_utf_string_rangess_adjust(const f_array_length_t length, f_utf_string_rangess_t *rangess) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_resize()
* @see f_utf_string_rangess_decrease_by()
* @see f_utf_string_rangess_increase_by()
* @see f_utf_string_rangess_terminate()
* @see f_utf_string_rangess_terminate_after()
- * @see private_f_utf_string_dynamic_resize()
*/
#if !defined(_di_f_utf_string_rangess_decrease_by_) || !defined(_di_f_utf_string_rangess_increase_) || !defined(_di_f_utf_string_rangess_increase_by_) || !defined(_di_f_utf_string_rangess_terminate_) || !defined(_di_f_utf_string_rangess_terminate_after_)
extern f_status_t private_f_utf_string_rangess_resize(const f_array_length_t length, f_utf_string_rangess_t *rangess) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_utf_string_triples_adjust()
* @see f_utf_string_triples_decimate_by()
- * @see private_f_utf_string_dynamic_adjust()
*/
#if !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_)
extern f_status_t private_f_utf_string_triples_adjust(const f_array_length_t length, f_utf_string_triples_t *triples) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_utf_string_dynamic_adjust().
*
* @see f_memory_resize()
* @see f_utf_string_triples_decrease_by()
* @see f_utf_string_triples_increase_by()
* @see f_utf_string_triples_terminate()
* @see f_utf_string_triples_terminate_after()
- * @see private_f_utf_string_dynamic_resize()
*/
#if !defined(_di_f_utf_string_triples_decrease_by_) || !defined(_di_f_utf_string_triples_increase_) || !defined(_di_f_utf_string_triples_increase_by_) || !defined(_di_f_utf_string_triples_terminate_) || !defined(_di_f_utf_string_triples_terminate_after_)
extern f_status_t private_f_utf_string_triples_resize(const f_array_length_t length, f_utf_string_triples_t *triples) f_gcc_attribute_visibility_internal;
}
#endif // _di_f_utf_buffer_increment_
+#ifndef _di_f_utf_char_to_character_
+ f_status_t f_utf_char_to_character(const f_string_t character, const f_array_length_t width_max, f_utf_character_t *character_utf) {
+ #ifndef _di_level_0_parameter_checking_
+ if (width_max < 1) return F_status_set_error(F_parameter);
+ if (!character_utf) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ const uint8_t width = f_macro_utf_byte_width_is(*character);
+
+ if (!width) {
+ *character_utf = f_macro_utf_character_t_from_char_1(character[0]);
+ return F_none;
+ }
+ else if (width == 1) {
+ return F_status_is_error(F_utf);
+ }
+
+ if (width > width_max) {
+ return F_status_set_error(F_failure);
+ }
+
+ *character_utf = f_macro_utf_character_t_from_char_1(character[0]);
+
+ if (width < 2) {
+ return F_none;
+ }
+
+ *character_utf |= f_macro_utf_character_t_from_char_2(character[1]);
+
+ if (width == 2) {
+ return F_none;
+ }
+
+ *character_utf |= f_macro_utf_character_t_from_char_3(character[2]);
+
+ if (width == 3) {
+ return F_none;
+ }
+
+ *character_utf |= f_macro_utf_character_t_from_char_4(character[3]);
+
+ return F_none;
+ }
+#endif // _di_f_utf_char_to_character_
+
#ifndef _di_f_utf_character_is_
f_status_t f_utf_character_is(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
}
#endif // _di_f_utf_is_zero_width_
-#ifndef _di_f_utf_char_to_character_
- f_status_t f_utf_char_to_character(const f_string_t character, const f_array_length_t width_max, f_utf_character_t *character_utf) {
- #ifndef _di_level_0_parameter_checking_
- if (width_max < 1) return F_status_set_error(F_parameter);
- if (!character_utf) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- const uint8_t width = f_macro_utf_byte_width_is(*character);
-
- if (!width) {
- *character_utf = f_macro_utf_character_t_from_char_1(character[0]);
- return F_none;
- }
- else if (width == 1) {
- return F_status_is_error(F_utf);
- }
-
- if (width > width_max) {
- return F_status_set_error(F_failure);
- }
-
- *character_utf = f_macro_utf_character_t_from_char_1(character[0]);
-
- if (width < 2) {
- return F_none;
- }
-
- *character_utf |= f_macro_utf_character_t_from_char_2(character[1]);
-
- if (width == 2) {
- return F_none;
- }
-
- *character_utf |= f_macro_utf_character_t_from_char_3(character[2]);
-
- if (width == 3) {
- return F_none;
- }
-
- *character_utf |= f_macro_utf_character_t_from_char_4(character[3]);
-
- return F_none;
- }
-#endif // _di_f_utf_char_to_character_
-
#ifndef _di_f_utf_string_append_
f_status_t f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
}
#endif // _di_f_utf_string_append_nulless_
-#ifndef _di_f_utf_string_dynamic_append_
- f_status_t f_utf_string_dynamic_append(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- return private_f_utf_string_append(source.string, source.used, destination);
- }
-#endif // _di_f_utf_string_dynamic_append_
-
-#ifndef _di_f_utf_string_dynamic_append_assure_
- f_status_t f_utf_string_dynamic_append_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (destination->used < source.used) {
- return private_f_utf_string_append(source.string, source.used, destination);
- }
-
- f_array_length_t i = 1;
- f_array_length_t j = 1;
-
- while (i <= source.used && j <= destination->used) {
- if (!source.string[source.used - i]) {
- i++;
- continue;
- }
-
- if (!destination->string[destination->used - j]) {
- j++;
- continue;
- }
-
- if (source.string[source.used - i] != destination->string[destination->used - j]) {
- return private_f_utf_string_append(source.string, source.used, destination);
- }
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_utf_string_dynamic_append_assure_
-
-#ifndef _di_f_utf_string_dynamic_append_assure_nulless_
- f_status_t f_utf_string_dynamic_append_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (destination->used < source.used) {
- return private_f_utf_string_append_nulless(source.string, source.used, destination);
- }
-
- f_array_length_t i = 1;
- f_array_length_t j = 1;
-
- while (i <= source.used && j <= destination->used) {
- if (!source.string[source.used - i]) {
- i++;
- continue;
- }
-
- if (!destination->string[destination->used - j]) {
- j++;
- continue;
- }
-
- if (source.string[source.used - i] != destination->string[destination->used - j]) {
- return private_f_utf_string_append_nulless(source.string, source.used, destination);
- }
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_utf_string_dynamic_append_assure_nulless_
-
-#ifndef _di_f_utf_string_dynamic_append_nulless_
- f_status_t f_utf_string_dynamic_append_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- return private_f_utf_string_append_nulless(source.string, source.used, destination);
- }
-#endif // _di_f_utf_string_dynamic_append_nulless_
-
-#ifndef _di_f_utf_string_dynamic_mash_
- f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+#ifndef _di_f_utf_string_mash_
+ f_status_t f_utf_string_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!source.used) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length && destination->used) {
- const f_status_t status = private_f_utf_string_append(glue, glue_length, destination);
+ f_status_t status = private_f_utf_string_append(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
- return private_f_utf_string_append(source.string, source.used, destination);
+ return private_f_utf_string_append(source, length, destination);
}
-#endif // _di_f_utf_string_dynamic_mash_
+#endif // _di_f_utf_string_mash_
-#ifndef _di_f_utf_string_dynamic_mash_nulless_
- f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+#ifndef _di_f_utf_string_mash_nulless_
+ f_status_t f_utf_string_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!source.used) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length && destination->used) {
- const f_status_t status = private_f_utf_string_append_nulless(glue, glue_length, destination);
+ f_status_t status = private_f_utf_string_append_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
- return private_f_utf_string_append_nulless(source.string, source.used, destination);
+ return private_f_utf_string_append_nulless(source, length, destination);
}
-#endif // _di_f_utf_string_dynamic_mash_nulless_
+#endif // _di_f_utf_string_mash_nulless_
-#ifndef _di_f_utf_string_dynamic_mish_
- f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+#ifndef _di_f_utf_string_mish_
+ f_status_t f_utf_string_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!source.used) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length && destination->used) {
- const f_status_t status = private_f_utf_string_prepend(glue, glue_length, destination);
+ f_status_t status = private_f_utf_string_prepend(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
- return private_f_utf_string_prepend(source.string, source.used, destination);
+ return private_f_utf_string_prepend(source, length, destination);
}
-#endif // _di_f_utf_string_dynamic_mish_
+#endif // _di_f_utf_string_mish_
-#ifndef _di_f_utf_string_dynamic_mish_nulless_
- f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+#ifndef _di_f_utf_string_mish_nulless_
+ f_status_t f_utf_string_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!source.used) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length && destination->used) {
- const f_status_t status = private_f_utf_string_prepend_nulless(glue, glue_length, destination);
+ f_status_t status = private_f_utf_string_prepend_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
- return private_f_utf_string_prepend_nulless(source.string, source.used, destination);
+ return private_f_utf_string_prepend_nulless(source, length, destination);
}
-#endif // _di_f_utf_string_dynamic_mish_nulless_
+#endif // _di_f_utf_string_mish_nulless_
-#ifndef _di_f_utf_string_dynamic_partial_append_
- f_status_t f_utf_string_dynamic_partial_append(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+#ifndef _di_f_utf_string_prepend_
+ f_status_t f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
+ if (!length) return F_data_not_eos;
- return private_f_utf_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
+ return private_f_utf_string_prepend(source, length, destination);
}
-#endif // _di_f_utf_string_dynamic_partial_append_
+#endif // _di_f_utf_string_prepend_
-#ifndef _di_f_utf_string_dynamic_partial_append_assure_
- f_status_t f_utf_string_dynamic_partial_append_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+#ifndef _di_f_utf_string_prepend_assure_
+ f_status_t f_utf_string_prepend_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- const f_array_length_t length = (range.stop - range.start) + 1;
+ if (!length) return F_data_not_eos;
if (destination->used < length) {
- return private_f_utf_string_append(source.string + range.start, length, destination);
+ return private_f_utf_string_prepend(source, length, destination);
}
- f_array_length_t i = 1;
- f_array_length_t j = 1;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
- while (i <= length && j <= destination->used) {
- if (!source.string[range.stop - i]) {
+ while (i < length && j < destination->used) {
+
+ if (!source[i]) {
i++;
continue;
}
- if (!destination->string[destination->used - j]) {
+ if (!destination->string[j]) {
j++;
continue;
}
- if (source.string[range.stop - i] != destination->string[destination->used - j]) {
- return private_f_utf_string_append(source.string + range.start, length, destination);
+ if (source[i] != destination->string[i]) {
+ return private_f_utf_string_prepend(source, length, destination);
}
i++;
j++;
} // while
+
+ return F_none;
}
-#endif // _di_f_utf_string_dynamic_partial_append_assure_
+#endif // _di_f_utf_string_prepend_assure_
-#ifndef _di_f_utf_string_dynamic_partial_append_assure_nulless_
- f_status_t f_utf_string_dynamic_partial_append_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+#ifndef _di_f_utf_string_prepend_assure_nulless_
+ f_status_t f_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- const f_array_length_t length = (range.stop - range.start) + 1;
+ if (!length) return F_data_not_eos;
if (destination->used < length) {
- return private_f_utf_string_append_nulless(source.string + range.start, length, destination);
+ return private_f_utf_string_prepend_nulless(source, length, destination);
}
- f_array_length_t i = 1;
- f_array_length_t j = 1;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
- while (i <= length && j <= destination->used) {
- if (!source.string[range.stop - i]) {
+ while (i < length && j < destination->used) {
+
+ if (!source[i]) {
i++;
continue;
}
- if (!destination->string[destination->used - j]) {
+ if (!destination->string[j]) {
j++;
continue;
}
- if (source.string[range.stop - i] != destination->string[destination->used - j]) {
- return private_f_utf_string_append_nulless(source.string + range.start, length, destination);
+ if (source[i] != destination->string[i]) {
+ return private_f_utf_string_prepend_nulless(source, length, destination);
}
i++;
j++;
} // while
+
+ return F_none;
}
-#endif // _di_f_utf_string_dynamic_append_assure_nulless_
+#endif // _di_f_utf_string_prepend_assure_nulless_
-#ifndef _di_f_utf_string_dynamic_partial_append_nulless_
- f_status_t f_utf_string_dynamic_partial_append_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+#ifndef _di_f_utf_string_prepend_nulless_
+ f_status_t f_utf_string_prepend_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
+ if (!length) return F_data_not_eos;
- return private_f_utf_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
+ return private_f_utf_string_prepend_nulless(source, length, destination);
}
-#endif // _di_f_utf_string_dynamic_partial_append_nulless_
+#endif // _di_f_utf_string_prepend_nulless_
-#ifndef _di_f_utf_string_dynamic_partial_mash_
- f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+#ifndef _di_f_utf_string_seek_line_
+ f_status_t f_utf_string_seek_line(const f_utf_string_t string, f_utf_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- if (glue_length && destination->used) {
- f_status_t status = private_f_utf_string_append(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
+ if (range->start > range->stop) return F_data_not_stop;
- return private_f_utf_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_utf_string_dynamic_partial_mash_
+ while (string[range->start] != f_utf_character_t_eol) {
-#ifndef _di_f_utf_string_dynamic_partial_mash_nulless_
- f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
+ return F_status_set_error(F_utf);
+ }
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
+ range->start++;
- if (glue_length && destination->used) {
- f_status_t status = private_f_utf_string_append_nulless(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
+ if (range->start > range->stop) return F_none_stop;
+ } // while
- return private_f_utf_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
+ return F_none;
}
-#endif // _di_f_utf_string_dynamic_partial_mash_nulless_
+#endif // _di_f_utf_string_seek_line_
-#ifndef _di_f_utf_string_dynamic_partial_mish_
- f_status_t f_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+#ifndef _di_f_utf_string_seek_line_to_
+ f_status_t f_utf_string_seek_line_to(const f_utf_string_t string, const int8_t seek_to, f_utf_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
+ if (range->start > range->stop) return F_data_not_stop;
- if (glue_length && destination->used) {
- f_status_t status = private_f_utf_string_prepend(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_utf_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_utf_string_dynamic_partial_mish_
-
-#ifndef _di_f_utf_string_dynamic_partial_mish_nulless_
- f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- if (glue_length && destination->used) {
- f_status_t status = private_f_utf_string_prepend_nulless(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_utf_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_utf_string_dynamic_partial_mish_nulless_
-
-#ifndef _di_f_utf_string_dynamic_partial_prepend_
- f_status_t f_utf_string_dynamic_partial_prepend(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- return private_f_utf_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_utf_string_dynamic_partial_prepend_
-
-#ifndef _di_f_utf_string_dynamic_partial_prepend_assure_
- f_status_t f_utf_string_dynamic_partial_prepend_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- const f_array_length_t length = (range.stop - range.start) + 1;
-
- if (destination->used < length) {
- return private_f_utf_string_prepend(source.string + range.start, length, destination);
- }
-
- f_array_length_t i = 0;
- f_array_length_t j = 0;
-
- while (i < length && j < destination->used) {
- if (!source.string[i + range.start]) {
- i++;
- continue;
- }
-
- if (!destination->string[j]) {
- j++;
- continue;
- }
-
- if (source.string[i + range.start] != destination->string[i]) {
- return private_f_utf_string_prepend(source.string + range.start, length, destination);
- }
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_utf_string_dynamic_partial_prepend_assure_
-
-#ifndef _di_f_utf_string_dynamic_partial_prepend_assure_nulless_
- f_status_t f_utf_string_dynamic_partial_prepend_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- const f_array_length_t length = (range.stop - range.start) + 1;
-
- if (destination->used < length) {
- return private_f_utf_string_prepend_nulless(source.string + range.start, length, destination);
- }
-
- f_array_length_t i = 0;
- f_array_length_t j = 0;
-
- while (i < length && j < destination->used) {
- if (!source.string[i + range.start]) {
- i++;
- continue;
- }
-
- if (!destination->string[j]) {
- j++;
- continue;
- }
-
- if (source.string[i + range.start] != destination->string[i]) {
- return private_f_utf_string_prepend_nulless(source.string + range.start, length, destination);
- }
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_utf_string_dynamic_partial_prepend_assure_nulless
-
-#ifndef _di_f_utf_string_dynamic_partial_prepend_nulless_
- f_status_t f_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- return private_f_utf_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_utf_string_dynamic_partial_prepend_nulless
-
-#ifndef _di_f_utf_string_dynamic_prepend_
- f_status_t f_utf_string_dynamic_prepend(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- return private_f_utf_string_prepend(source.string, source.used, destination);
- }
-#endif // _di_f_utf_string_dynamic_prepend_
-
-#ifndef _di_f_utf_string_dynamic_prepend_assure_
- f_status_t f_utf_string_dynamic_prepend_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (destination->used < source.used) {
- return private_f_utf_string_prepend(source.string, source.used, destination);
- }
-
- f_array_length_t i = 0;
- f_array_length_t j = 0;
-
- while (i < source.used && j < destination->used) {
- if (!source.string[i]) {
- i++;
- continue;
- }
-
- if (!destination->string[j]) {
- j++;
- continue;
- }
-
- if (source.string[i] != destination->string[i]) {
- return private_f_utf_string_prepend(source.string, source.used, destination);
- }
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_utf_string_dynamic_prepend_assure_
-
-#ifndef _di_f_utf_string_dynamic_prepend_assure_nulless_
- f_status_t f_utf_string_dynamic_prepend_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (destination->used < source.used) {
- return private_f_utf_string_prepend_nulless(source.string, source.used, destination);
- }
-
- f_array_length_t i = 0;
- f_array_length_t j = 0;
-
- while (i < source.used && j < destination->used) {
- if (!source.string[i]) {
- i++;
- continue;
- }
-
- if (!destination->string[j]) {
- j++;
- continue;
- }
-
- if (source.string[i] != destination->string[i]) {
- return private_f_utf_string_prepend_nulless(source.string, source.used, destination);
- }
-
- i++;
- j++;
- } // while
+ while (string[range->start] != seek_to) {
- return F_none;
- }
-#endif // _di_f_utf_string_dynamic_prepend_assure_nulless_
-
-#ifndef _di_f_utf_string_dynamic_prepend_nulless_
- f_status_t f_utf_string_dynamic_prepend_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- return private_f_utf_string_prepend_nulless(source.string, source.used, destination);
- }
-#endif // _di_f_utf_string_dynamic_prepend_nulless_
-
-#ifndef _di_f_utf_string_dynamic_seek_line_to_
- f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
- #ifndef _di_level_0_parameter_checking_
- if (!range) return F_status_set_error(F_parameter);
- if (buffer.used <= range->start) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!buffer.used) return F_data_not_eos;
- if (range->start > range->stop) return F_data_not_stop;
-
- if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
- return F_status_set_error(F_utf);
- }
-
- while (buffer.string[range->start] != seek_to_this) {
-
- if (buffer.string[range->start] == f_utf_character_t_eol) {
- return F_none_eol;
- }
-
- range->start++;
-
- if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) return F_status_set_error(F_utf);
-
- if (range->start >= buffer.used) return F_none_eos;
- if (range->start > range->stop) return F_none_stop;
- } // while
-
- return F_none;
- }
-#endif // _di_f_utf_string_dynamic_seek_line_to_
-
-#ifndef _di_f_utf_string_dynamic_seek_to_
- f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
- #ifndef _di_level_0_parameter_checking_
- if (!range) return F_status_set_error(F_parameter);
- if (buffer.used <= range->start) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!buffer.used) return F_data_not_eos;
- if (range->start > range->stop) return F_data_not_stop;
-
- if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
- return F_status_set_error(F_utf);
- }
-
- while (buffer.string[range->start] != seek_to_this) {
- range->start++;
-
- if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
- if (range->start >= buffer.used) return F_none_eos;
- if (range->start > range->stop) return F_none_stop;
- } // while
-
- return F_none;
- }
-#endif // _di_f_utf_string_dynamic_seek_to_
-
-#ifndef _di_f_utf_string_dynamic_terminate_
- f_status_t f_utf_string_dynamic_terminate(f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- if (destination->used > destination->size) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!destination->used && destination->size && !destination->string[destination->used - 1]) {
- return F_none;
- }
-
- if (destination->used == f_array_length_t_size) {
- return F_status_set_error(F_string_too_large);
- }
-
- const f_array_length_t total = destination->used + 1;
-
- if (total > destination->size) {
- const f_status_t status = private_f_utf_string_dynamic_resize(total, destination);
- if (F_status_is_error(status)) return status;
- }
-
- destination->string[destination->used] = 0;
- destination->used = total;
-
- return F_none;
- }
-#endif // _di_f_utf_string_dynamic_terminate_
-
-#ifndef _di_f_utf_string_dynamic_terminate_after_
- f_status_t f_utf_string_dynamic_terminate_after(f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- if (destination->used > destination->size) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (destination->used) {
- for (; destination->used; destination->used--) {
- if (!destination->string[destination->used - 1]) continue;
- break;
- } // for
- }
-
- if (destination->used == f_array_length_t_size) {
- return F_status_set_error(F_string_too_large);
- }
-
- const f_array_length_t total = destination->used + 1;
-
- if (total > destination->size) {
- const f_status_t status = private_f_utf_string_dynamic_resize(total, destination);
- if (F_status_is_error(status)) return status;
- }
-
- destination->string[destination->used] = 0;
- destination->used = total - 1;
-
- return F_none;
- }
-#endif // _di_f_utf_string_dynamic_terminate_after_
-
-#ifndef _di_f_utf_string_mash_
- f_status_t f_utf_string_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!length) return F_data_not_eos;
-
- if (glue_length && destination->used) {
- f_status_t status = private_f_utf_string_append(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_utf_string_append(source, length, destination);
- }
-#endif // _di_f_utf_string_mash_
-
-#ifndef _di_f_utf_string_mash_nulless_
- f_status_t f_utf_string_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!length) return F_data_not_eos;
-
- if (glue_length && destination->used) {
- f_status_t status = private_f_utf_string_append_nulless(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_utf_string_append_nulless(source, length, destination);
- }
-#endif // _di_f_utf_string_mash_nulless_
-
-#ifndef _di_f_utf_string_mish_
- f_status_t f_utf_string_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!length) return F_data_not_eos;
-
- if (glue_length && destination->used) {
- f_status_t status = private_f_utf_string_prepend(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_utf_string_prepend(source, length, destination);
- }
-#endif // _di_f_utf_string_mish_
-
-#ifndef _di_f_utf_string_mish_nulless_
- f_status_t f_utf_string_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!length) return F_data_not_eos;
-
- if (glue_length && destination->used) {
- f_status_t status = private_f_utf_string_prepend_nulless(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_utf_string_prepend_nulless(source, length, destination);
- }
-#endif // _di_f_utf_string_mish_nulless_
-
-#ifndef _di_f_utf_string_prepend_
- f_status_t f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!length) return F_data_not_eos;
-
- return private_f_utf_string_prepend(source, length, destination);
- }
-#endif // _di_f_utf_string_prepend_
-
-#ifndef _di_f_utf_string_prepend_assure_
- f_status_t f_utf_string_prepend_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!length) return F_data_not_eos;
- if (destination->used < length) return private_f_utf_string_prepend(source, length, destination);
-
- f_array_length_t i = 0;
- f_array_length_t j = 0;
-
- while (i < length && j < destination->used) {
- if (!source[i]) {
- i++;
- continue;
- }
-
- if (!destination->string[j]) {
- j++;
- continue;
- }
-
- if (source[i] != destination->string[i]) return private_f_utf_string_prepend(source, length, destination);
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_utf_string_prepend_assure_
-
-#ifndef _di_f_utf_string_prepend_assure_nulless_
- f_status_t f_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!length) return F_data_not_eos;
- if (destination->used < length) return private_f_utf_string_prepend_nulless(source, length, destination);
-
- f_array_length_t i = 0;
- f_array_length_t j = 0;
-
- while (i < length && j < destination->used) {
- if (!source[i]) {
- i++;
- continue;
- }
-
- if (!destination->string[j]) {
- j++;
- continue;
- }
-
- if (source[i] != destination->string[i]) return private_f_utf_string_prepend_nulless(source, length, destination);
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_utf_string_prepend_assure_nulless_
-
-#ifndef _di_f_utf_string_prepend_nulless_
- f_status_t f_utf_string_prepend_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!length) return F_data_not_eos;
-
- return private_f_utf_string_prepend_nulless(source, length, destination);
- }
-#endif // _di_f_utf_string_prepend_nulless_
-
-#ifndef _di_f_utf_string_seek_line_to_
- f_status_t f_utf_string_seek_line_to(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
- #ifndef _di_level_0_parameter_checking_
- if (!range) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (range->start > range->stop) return F_data_not_stop;
-
- if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
- return F_status_set_error(F_utf);
- }
-
- while (string[range->start] != seek_to_this) {
-
- if (string[range->start] == f_utf_character_t_eol) {
- return F_none_eol;
- }
+ if (string[range->start] == f_utf_character_t_eol) return F_none_eol;
range->start++;
- if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
- return F_status_set_error(F_utf);
- }
-
if (range->start > range->stop) return F_none_stop;
} // while
#endif // _di_f_utf_string_seek_line_to_
#ifndef _di_f_utf_string_seek_to_
- f_status_t f_utf_string_seek_to(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
+ f_status_t f_utf_string_seek_to(const f_utf_string_t string, const int8_t seek_to, f_utf_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
- if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
- return F_status_set_error(F_utf);
- }
-
- while (string[range->start] != seek_to_this) {
- range->start++;
+ while (string[range->start] != seek_to) {
if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
+ range->start++;
+
if (range->start > range->stop) return F_none_stop;
} // while
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_append_
- extern f_status_t f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_append_
-
-/**
- * Append the source string onto the destination, but only if the string is not already at the end.
- *
- * This ignores NULL characters when comparing both the source and the destination.
- *
- * @param source
- * The source string to append.
- * @param length
- * The length of source to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_append_assure_
- extern f_status_t f_utf_string_append_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_append_assure_
-
-/**
- * Append the source string onto the destination, but only if the string is not already at the end.
- *
- * This ignores NULL characters when comparing both the source and the destination.
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param length
- * The length of source to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_append_assure_nulless_
- extern f_status_t f_utf_string_append_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_append_assure_nulless_
-
-/**
- * Append the source string onto the destination.
- *
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param length
- * The length of source to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_append_nulless_
- extern f_status_t f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_append_nulless_
-
-/**
- * Append the source string onto the destination.
- *
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_append_
- extern f_status_t f_utf_string_dynamic_append(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_append_
-
-/**
- * Append the source string onto the destination.
- *
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_append_assure_
- extern f_status_t f_utf_string_dynamic_append_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_append_assure_
-
-/**
- * Append the source string onto the destination.
- *
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_append_assure_nulless_
- extern f_status_t f_utf_string_dynamic_append_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_append_assure_nulless_
-
-/**
- * Append the source string onto the destination.
- *
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_append_nulless_
- extern f_status_t f_utf_string_dynamic_append_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_append_nulless_
-
-/**
- * Append the source string onto the destination with the glue in between.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_mash_
- extern f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_mash_
-
-/**
- * Append the source string onto the destination with the glue in between.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * Skips over NULL characters from glue and source when appending.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_mash_nulless_
- extern f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_mash_nulless_
-
-/**
- * Prepend the source string onto the destination with the glue in between.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_mish_
- extern f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_mish_
-
-/**
- * Prepend the source string onto the destination with the glue in between.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * Skips over NULL characters from glue and source when appending.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_mish_nulless_
- extern f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_mish_nulless_
-
-/**
- * Append the source string onto the destination, but restricted to the given range.
- *
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_partial_append_
- extern f_status_t f_utf_string_dynamic_partial_append(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_append_
-
-/**
- * Append the source string onto the destination, but only if the string is not already at the end and restricted to the given range
- *
- * This ignores NULL characters when comparing both the source and the destination.
- *
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_partial_append_assure_
- extern f_status_t f_utf_string_dynamic_partial_append_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_append_assure_
-
-/**
- * Append the source string onto the destination, but only if the string is not already at the end and restricted to the given range
- *
- * This ignores NULL characters when comparing both the source and the destination.
- *
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_partial_append_assure_nulless_
- extern f_status_t f_utf_string_dynamic_partial_append_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_append_assure_nulless_
-
-/**
- * Append the source string onto the destination, but restricted to the given range.
- *
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_partial_append_nulless_
- extern f_status_t f_utf_string_dynamic_partial_append_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_append_nulless_
-
-/**
- * Append the source string onto the destination with the glue in between, but restricted to the given range.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_partial_mash_
- extern f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_mash_
-
-/**
- * Append the source string onto the destination with the glue in between, but restricted to the given range.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * Skips over NULL characters from glue and source when appending.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_partial_mash_nulless_
- extern f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_mash_nulless_
-
-/**
- * Prepend the source string onto the destination with the glue in between, but restricted to the given range.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_partial_mish_
- extern f_status_t f_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_mish_
-
-/**
- * Prepend the source string onto the destination with the glue in between, but restricted to the given range.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * Skips over NULL characters from glue and source when appending.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_partial_mish_nulless_
- extern f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_mish_nulless_
-
-/**
- * Prepend the source string onto the destination, but restricted to the given range.
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
- *
- * @param source
- * The source string to prepend.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is prepended onto.
*
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_partial_prepend_
- extern f_status_t f_utf_string_dynamic_partial_prepend(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_prepend_
-
-/**
- * Prepend the source string onto the destination, but only if the string is not already at the end and restricted to the given range
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
- *
- * This ignores NULL characters when comparing both the source and the destination.
*
- * @param source
- * The source string to prepend.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is prepended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
+ * Errors (with error bit) from: f_memory_resize().
*/
-#ifndef _di_f_utf_string_dynamic_partial_prepend_assure_
- extern f_status_t f_utf_string_dynamic_partial_prepend_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_prepend_assure_
+#ifndef _di_f_utf_string_append_
+ extern f_status_t f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_append_
/**
- * Prepend the source string onto the destination, but only if the string is not already at the end and restricted to the given range
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ * Append the source string onto the destination, but only if the string is not already at the end.
*
* This ignores NULL characters when comparing both the source and the destination.
*
* @param source
- * The source string to prepend.
- * @param range
- * A range within the source to restrict the copy from.
+ * The source string to append.
+ * @param length
+ * The length of source to append.
* @param destination
- * The destination string the source is prepended onto.
+ * The destination string the source is appended onto.
*
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_partial_prepend_assure_nulless_
- extern f_status_t f_utf_string_dynamic_partial_prepend_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_prepend_assure_nulless_
-
-/**
- * Prepend the source string onto the destination, but restricted to the given range.
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
- *
- * @param source
- * The source string to prepend.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is prepended onto.
*
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_partial_prepend_nulless_
- extern f_status_t f_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_partial_prepend_nulless_
-
-/**
- * Prepend the source string onto the destination.
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
- *
- * @param source
- * The source string to prepend.
- * @param destination
- * The destination string the source is prepended onto.
*
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
+ * Errors (with error bit) from: f_memory_resize().
*/
-#ifndef _di_f_utf_string_dynamic_prepend_
- extern f_status_t f_utf_string_dynamic_prepend(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_prepend_
+#ifndef _di_f_utf_string_append_assure_
+ extern f_status_t f_utf_string_append_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_append_assure_
/**
- * Prepend the source string onto the destination, but only if the string is not already at the beginning.
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ * Append the source string onto the destination, but only if the string is not already at the end.
*
* This ignores NULL characters when comparing both the source and the destination.
+ * Skips over NULL characters from source when appending.
*
* @param source
- * The source string to prepend.
+ * The source string to append.
+ * @param length
+ * The length of source to append.
* @param destination
- * The destination string the source is prepended onto.
+ * The destination string the source is appended onto.
*
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_prepend_assure_
- extern f_status_t f_utf_string_dynamic_prepend_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_prepend_assure_
-
-/**
- * Prepend the source string onto the destination, but only if the string is not already at the beginning.
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
*
- * This ignores NULL characters when comparing both the source and the destination.
- *
- * @param source
- * The source string to prepend.
- * @param destination
- * The destination string the source is prepended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
-#ifndef _di_f_utf_string_dynamic_prepend_assure_nulless_
- extern f_status_t f_utf_string_dynamic_prepend_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_prepend_assure_nulless_
+#ifndef _di_f_utf_string_append_assure_nulless_
+ extern f_status_t f_utf_string_append_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_append_assure_nulless_
/**
- * Prepend the source string onto the destination.
+ * Append the source string onto the destination.
*
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ * Skips over NULL characters from source when appending.
*
* @param source
- * The source string to prepend.
+ * The source string to append.
+ * @param length
+ * The length of source to append.
* @param destination
- * The destination string the source is prepended onto.
+ * The destination string the source is appended onto.
*
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_utf_string_dynamic_prepend_nulless_
- extern f_status_t f_utf_string_dynamic_prepend_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_prepend_nulless_
-
-/**
- * Seek the buffer location forward until the UTF-8 character or EOL is reached.
- *
- * @param buffer
- * The buffer to traverse.
- * @param range
- * A range within the buffer representing the start and stop locations.
- * The start location will be incremented by seek.
- * @param seek_to_this
- * A UTF-8 character representing a character to seek to.
- *
- * @return
- * F_none on success.
- * F_none_eol on success, but stopped at EOL.
- * F_none_eos on success, but stopped at end of buffer.
- * F_none_stop on success, but stopped stop location.
- * F_data_not_eos if buffer length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
- */
-#ifndef _di_f_utf_string_dynamic_seek_line_to_
- extern f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t seek_to_this);
-#endif // _di_f_utf_string_dynamic_seek_line_to_
-
-/**
- * Seek the buffer location forward until the UTF-8 character is reached.
- *
- * @param buffer
- * The buffer to traverse.
- * @param range
- * A range within the buffer representing the start and stop locations.
- * The start location will be incremented by seek.
- * @param seek_to_this
- * A UTF-8 character representing a character to seek to.
- *
- * @return
- * F_none on success.
- * F_none_eos on success, but stopped at end of buffer.
- * F_none_stop on success, but stopped stop location.
- * F_data_not_eos if buffer length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
- */
-#ifndef _di_f_utf_string_dynamic_seek_to_
- extern f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t seek_to_this);
-#endif // _di_f_utf_string_dynamic_seek_to_
-
-/**
- * Guarantee that an end of string (NULL) exists at the end of the string.
- *
- * This is intended to be used for anything requiring NULL terminated strings.
- * This will reallocate more space if necessary.
- *
- * If destination size is 0, then it will be reallocated and have the NULL assigned at index 0.
*
- * @param destination
- * The new string, which will be allocated or reallocated as necessary.
- *
- * @return
- * F_none on success.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if string is too large to fit into the buffer.
- */
-#ifndef _di_f_utf_string_dynamic_terminate_
- extern f_status_t f_utf_string_dynamic_terminate(f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_terminate_
-
-/**
- * Guarantee that an end of string (NULL) exists at the end of the string.
- *
- * This ensures that the terminating NULL not only exists but is not counted in destination.used.
- *
- * This is intended to be used for anything requiring NULL terminated strings whose used length cannot be counted.
- * This will reallocate more space if necessary.
- *
- * If destination size is 0, then it will be reallocated and have the NULL assigned at index 0.
- *
- * @param destination
- * The new string, which will be allocated or reallocated as necessary.
+ * F_string_too_large (with error bit) if the combined string is too large.
*
- * @return
- * F_none on success.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if string is too large to fit into the buffer.
+ * Errors (with error bit) from: f_memory_resize().
*/
-#ifndef _di_f_utf_string_dynamic_terminate_after_
- extern f_status_t f_utf_string_dynamic_terminate_after(f_utf_string_dynamic_t *destination);
-#endif // _di_f_utf_string_dynamic_terminate_after_
+#ifndef _di_f_utf_string_append_nulless_
+ extern f_status_t f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_append_nulless_
/**
* Append the source string onto the destination with the glue in between.
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_mash_
extern f_status_t f_utf_string_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_mash_nulless_
extern f_status_t f_utf_string_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_mish_
extern f_status_t f_utf_string_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_mish_nulless_
extern f_status_t f_utf_string_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_prepend_
extern f_status_t f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_prepend_assure_
extern f_status_t f_utf_string_prepend_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_prepend_assure_nulless_
extern f_status_t f_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_prepend_nulless_
extern f_status_t f_utf_string_prepend_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_prepend_nulless_
/**
- * Seek the UTF-8 string location forward until the character (1-byte wide) or EOL is reached.
+ * Seek the string location forward until EOL is reached.
*
* @param string
* The string to traverse.
* @param range
* A range within the buffer representing the start and stop locations.
* The start location will be incremented by seek.
- * @param seek_to_this
+ *
+ * @return
+ * F_none on success.
+ * F_none_stop on success, but stopped at end of range.
+ * F_data_not_stop on success, but the range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) if character is invalid UTF-8.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_seek_line_
+ extern f_status_t f_utf_string_seek_line(const f_utf_string_t string, f_utf_string_range_t *range);
+#endif // _di_f_utf_string_seek_line_
+
+/**
+ * Seek the string location forward until the character (1-byte wide) or EOL is reached.
+ *
+ * @param string
+ * The string to traverse.
+ * @param seek_to
* A single-width character representing a character to seek to.
+ * @param range
+ * A range within the buffer representing the start and stop locations.
+ * The start location will be incremented by seek.
*
* @return
* F_none on success.
* F_none_eol on success, but stopped at EOL.
* F_none_stop on success, but stopped stop location.
* F_data_not_stop if range.start > range.stop.
+ *
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) if character is invalid UTF-8.
*/
#ifndef _di_f_utf_string_seek_line_to_
- extern f_status_t f_utf_string_seek_line_to(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t seek_to_this);
+ extern f_status_t f_utf_string_seek_line_to(const f_utf_string_t string, const int8_t seek_to, f_utf_string_range_t *range);
#endif // _di_f_utf_string_seek_line_to_
/**
* Seek the string location forward until the character (1-byte wide) is reached.
*
* @param string
- * The sting to traverse.
+ * The string to traverse.
+ * @param seek_to
+ * A single-width character representing a character to seek to.
* @param range
* A range within the buffer representing the start and stop locations.
* The start location will be incremented by seek.
- * @param seek_to_this
- * A UTF-8 character representing a character to seek to.
*
* @return
* F_none on success.
* F_none_stop on success, but stopped stop location.
* F_data_not_stop if range.start > range.stop.
+ *
* F_parameter (with error bit) if a parameter is invalid.
- * F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
+ * F_utf (with error bit) if character is invalid UTF-8.
*/
#ifndef _di_f_utf_string_seek_to_
- extern f_status_t f_utf_string_seek_to(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t seek_to_this);
+ extern f_status_t f_utf_string_seek_to(const f_utf_string_t string, const int8_t seek_to, f_utf_string_range_t *range);
#endif // _di_f_utf_string_seek_to_
#ifdef __cplusplus
}
#endif // _di_f_utf_string_dynamic_adjust_
+#ifndef _di_f_utf_string_dynamic_append_
+ f_status_t f_utf_string_dynamic_append(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ return private_f_utf_string_append(source.string, source.used, destination);
+ }
+#endif // _di_f_utf_string_dynamic_append_
+
+#ifndef _di_f_utf_string_dynamic_append_assure_
+ f_status_t f_utf_string_dynamic_append_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (destination->used < source.used) {
+ return private_f_utf_string_append(source.string, source.used, destination);
+ }
+
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
+
+ while (i <= source.used && j <= destination->used) {
+ if (!source.string[source.used - i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[destination->used - j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[source.used - i] != destination->string[destination->used - j]) {
+ return private_f_utf_string_append(source.string, source.used, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_dynamic_append_assure_
+
+#ifndef _di_f_utf_string_dynamic_append_assure_nulless_
+ f_status_t f_utf_string_dynamic_append_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (destination->used < source.used) {
+ return private_f_utf_string_append_nulless(source.string, source.used, destination);
+ }
+
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
+
+ while (i <= source.used && j <= destination->used) {
+ if (!source.string[source.used - i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[destination->used - j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[source.used - i] != destination->string[destination->used - j]) {
+ return private_f_utf_string_append_nulless(source.string, source.used, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_dynamic_append_assure_nulless_
+
+#ifndef _di_f_utf_string_dynamic_append_nulless_
+ f_status_t f_utf_string_dynamic_append_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ return private_f_utf_string_append_nulless(source.string, source.used, destination);
+ }
+#endif // _di_f_utf_string_dynamic_append_nulless_
+
#ifndef _di_f_utf_string_dynamic_decimate_by_
f_status_t f_utf_string_dynamic_decimate_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
}
#endif // _di_f_utf_string_dynamic_increase_by_
+#ifndef _di_f_utf_string_dynamic_mash_
+ f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (glue_length && destination->used) {
+ const f_status_t status = private_f_utf_string_append(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_utf_string_append(source.string, source.used, destination);
+ }
+#endif // _di_f_utf_string_dynamic_mash_
+
+#ifndef _di_f_utf_string_dynamic_mash_nulless_
+ f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (glue_length && destination->used) {
+ const f_status_t status = private_f_utf_string_append_nulless(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_utf_string_append_nulless(source.string, source.used, destination);
+ }
+#endif // _di_f_utf_string_dynamic_mash_nulless_
+
+#ifndef _di_f_utf_string_dynamic_mish_
+ f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (glue_length && destination->used) {
+ const f_status_t status = private_f_utf_string_prepend(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_utf_string_prepend(source.string, source.used, destination);
+ }
+#endif // _di_f_utf_string_dynamic_mish_
+
+#ifndef _di_f_utf_string_dynamic_mish_nulless_
+ f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (glue_length && destination->used) {
+ const f_status_t status = private_f_utf_string_prepend_nulless(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_utf_string_prepend_nulless(source.string, source.used, destination);
+ }
+#endif // _di_f_utf_string_dynamic_mish_nulless_
+
+#ifndef _di_f_utf_string_dynamic_partial_append_
+ f_status_t f_utf_string_dynamic_partial_append(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ return private_f_utf_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_utf_string_dynamic_partial_append_
+
+#ifndef _di_f_utf_string_dynamic_partial_append_assure_
+ f_status_t f_utf_string_dynamic_partial_append_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ const f_array_length_t length = (range.stop - range.start) + 1;
+
+ if (destination->used < length) {
+ return private_f_utf_string_append(source.string + range.start, length, destination);
+ }
+
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
+
+ while (i <= length && j <= destination->used) {
+ if (!source.string[range.stop - i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[destination->used - j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[range.stop - i] != destination->string[destination->used - j]) {
+ return private_f_utf_string_append(source.string + range.start, length, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+ }
+#endif // _di_f_utf_string_dynamic_partial_append_assure_
+
+#ifndef _di_f_utf_string_dynamic_partial_append_assure_nulless_
+ f_status_t f_utf_string_dynamic_partial_append_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ const f_array_length_t length = (range.stop - range.start) + 1;
+
+ if (destination->used < length) {
+ return private_f_utf_string_append_nulless(source.string + range.start, length, destination);
+ }
+
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
+
+ while (i <= length && j <= destination->used) {
+ if (!source.string[range.stop - i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[destination->used - j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[range.stop - i] != destination->string[destination->used - j]) {
+ return private_f_utf_string_append_nulless(source.string + range.start, length, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+ }
+#endif // _di_f_utf_string_dynamic_append_assure_nulless_
+
+#ifndef _di_f_utf_string_dynamic_partial_append_nulless_
+ f_status_t f_utf_string_dynamic_partial_append_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ return private_f_utf_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_utf_string_dynamic_partial_append_nulless_
+
+#ifndef _di_f_utf_string_dynamic_partial_mash_
+ f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ if (glue_length && destination->used) {
+ f_status_t status = private_f_utf_string_append(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_utf_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_utf_string_dynamic_partial_mash_
+
+#ifndef _di_f_utf_string_dynamic_partial_mash_nulless_
+ f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ if (glue_length && destination->used) {
+ f_status_t status = private_f_utf_string_append_nulless(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_utf_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_utf_string_dynamic_partial_mash_nulless_
+
+#ifndef _di_f_utf_string_dynamic_partial_mish_
+ f_status_t f_utf_string_partial_dynamic_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ if (glue_length && destination->used) {
+ f_status_t status = private_f_utf_string_prepend(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_utf_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_utf_string_dynamic_partial_mish_
+
+#ifndef _di_f_utf_string_dynamic_partial_mish_nulless_
+ f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ if (glue_length && destination->used) {
+ f_status_t status = private_f_utf_string_prepend_nulless(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_utf_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_utf_string_dynamic_partial_mish_nulless_
+
+#ifndef _di_f_utf_string_dynamic_partial_prepend_
+ f_status_t f_utf_string_dynamic_partial_prepend(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ return private_f_utf_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_utf_string_dynamic_partial_prepend_
+
+#ifndef _di_f_utf_string_dynamic_partial_prepend_assure_
+ f_status_t f_utf_string_dynamic_partial_prepend_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ const f_array_length_t length = (range.stop - range.start) + 1;
+
+ if (destination->used < length) {
+ return private_f_utf_string_prepend(source.string + range.start, length, destination);
+ }
+
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+
+ while (i < length && j < destination->used) {
+ if (!source.string[i + range.start]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[i + range.start] != destination->string[i]) {
+ return private_f_utf_string_prepend(source.string + range.start, length, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_dynamic_partial_prepend_assure_
+
+#ifndef _di_f_utf_string_dynamic_partial_prepend_assure_nulless_
+ f_status_t f_utf_string_dynamic_partial_prepend_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ const f_array_length_t length = (range.stop - range.start) + 1;
+
+ if (destination->used < length) {
+ return private_f_utf_string_prepend_nulless(source.string + range.start, length, destination);
+ }
+
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+
+ while (i < length && j < destination->used) {
+ if (!source.string[i + range.start]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[i + range.start] != destination->string[i]) {
+ return private_f_utf_string_prepend_nulless(source.string + range.start, length, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_dynamic_partial_prepend_assure_nulless
+
+#ifndef _di_f_utf_string_dynamic_partial_prepend_nulless_
+ f_status_t f_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ return private_f_utf_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_utf_string_dynamic_partial_prepend_nulless
+
+#ifndef _di_f_utf_string_dynamic_prepend_
+ f_status_t f_utf_string_dynamic_prepend(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ return private_f_utf_string_prepend(source.string, source.used, destination);
+ }
+#endif // _di_f_utf_string_dynamic_prepend_
+
+#ifndef _di_f_utf_string_dynamic_prepend_assure_
+ f_status_t f_utf_string_dynamic_prepend_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (destination->used < source.used) {
+ return private_f_utf_string_prepend(source.string, source.used, destination);
+ }
+
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+
+ while (i < source.used && j < destination->used) {
+ if (!source.string[i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[i] != destination->string[i]) {
+ return private_f_utf_string_prepend(source.string, source.used, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_dynamic_prepend_assure_
+
+#ifndef _di_f_utf_string_dynamic_prepend_assure_nulless_
+ f_status_t f_utf_string_dynamic_prepend_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (destination->used < source.used) {
+ return private_f_utf_string_prepend_nulless(source.string, source.used, destination);
+ }
+
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+
+ while (i < source.used && j < destination->used) {
+ if (!source.string[i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[i] != destination->string[i]) {
+ return private_f_utf_string_prepend_nulless(source.string, source.used, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_dynamic_prepend_assure_nulless_
+
+#ifndef _di_f_utf_string_dynamic_prepend_nulless_
+ f_status_t f_utf_string_dynamic_prepend_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ return private_f_utf_string_prepend_nulless(source.string, source.used, destination);
+ }
+#endif // _di_f_utf_string_dynamic_prepend_nulless_
+
#ifndef _di_f_utf_string_dynamic_resize_
- f_status_t f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) {
+ f_status_t f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
- if (!dynamic) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- return private_f_utf_string_dynamic_resize(length, dynamic);
+ return private_f_utf_string_dynamic_resize(length, buffer);
}
#endif // _di_f_utf_string_dynamic_resize_
+#ifndef _di_f_utf_string_dynamic_seek_line_
+ f_status_t f_utf_string_dynamic_seek_line(const f_utf_string_static_t buffer, f_utf_string_range_t *range) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!range) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!buffer.used) return F_data_not_eos;
+ if (range->start > range->stop) return F_data_not_stop;
+
+ while (buffer.string[range->start] != f_utf_character_t_eol) {
+
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
+ return F_status_set_error(F_utf);
+ }
+
+ range->start++;
+
+ if (range->start >= buffer.used) return F_none_eos;
+ if (range->start > range->stop) return F_none_stop;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_dynamic_seek_line_
+
+#ifndef _di_f_utf_string_dynamic_seek_line_to_
+ f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, const int8_t seek_to_this, f_utf_string_range_t *range) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!range) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!buffer.used) return F_data_not_eos;
+ if (range->start > range->stop) return F_data_not_stop;
+
+ while (buffer.string[range->start] != seek_to_this) {
+
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
+ return F_status_set_error(F_utf);
+ }
+
+ if (buffer.string[range->start] == f_utf_character_t_eol) return F_none_eol;
+
+ range->start++;
+
+ if (range->start >= buffer.used) return F_none_eos;
+ if (range->start > range->stop) return F_none_stop;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_dynamic_seek_line_to_
+
+#ifndef _di_f_utf_string_dynamic_seek_to_
+ f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, const int8_t seek_to_this, f_utf_string_range_t *range) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!range) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!buffer.used) return F_data_not_eos;
+ if (range->start > range->stop) return F_data_not_stop;
+
+ while (buffer.string[range->start] != seek_to_this) {
+
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
+ return F_status_set_error(F_utf);
+ }
+
+ range->start++;
+
+ if (range->start >= buffer.used) return F_none_eos;
+ if (range->start > range->stop) return F_none_stop;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_dynamic_seek_to_
+
+#ifndef _di_f_utf_string_dynamic_terminate_
+ f_status_t f_utf_string_dynamic_terminate(f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ if (destination->used > destination->size) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!destination->used && destination->size && !destination->string[destination->used - 1]) {
+ return F_none;
+ }
+
+ if (destination->used == f_array_length_t_size) {
+ return F_status_set_error(F_string_too_large);
+ }
+
+ const f_array_length_t total = destination->used + 1;
+
+ if (total > destination->size) {
+ const f_status_t status = private_f_utf_string_dynamic_resize(total, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ destination->string[destination->used] = 0;
+ destination->used = total;
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_dynamic_terminate_
+
+#ifndef _di_f_utf_string_dynamic_terminate_after_
+ f_status_t f_utf_string_dynamic_terminate_after(f_utf_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ if (destination->used > destination->size) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (destination->used) {
+ for (; destination->used; destination->used--) {
+ if (!destination->string[destination->used - 1]) continue;
+ break;
+ } // for
+ }
+
+ if (destination->used == f_array_length_t_size) {
+ return F_status_set_error(F_string_too_large);
+ }
+
+ const f_array_length_t total = destination->used + 1;
+
+ if (total > destination->size) {
+ const f_status_t status = private_f_utf_string_dynamic_resize(total, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ destination->string[destination->used] = 0;
+ destination->used = total - 1;
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_dynamic_terminate_after_
+
#ifndef _di_f_utf_string_dynamics_adjust_
f_status_t f_utf_string_dynamics_adjust(const f_array_length_t length, f_utf_string_dynamics_t *dynamics) {
#ifndef _di_level_0_parameter_checking_
}
#endif // _di_f_utf_string_dynamics_adjust_
+#ifndef _di_f_utf_string_dynamics_append_
+ f_status_t f_utf_string_dynamics_append(const f_utf_string_dynamics_t source, f_utf_string_dynamics_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not;
+
+ return private_f_utf_string_dynamics_append(source, destination);
+ }
+#endif // _di_f_utf_string_dynamics_append_
+
#ifndef _di_f_utf_string_dynamics_decimate_by_
f_status_t f_utf_string_dynamics_decimate_by(const f_array_length_t amount, f_utf_string_dynamics_t *dynamics) {
#ifndef _di_level_0_parameter_checking_
extern "C" {
#endif
+// fll-0 string includes
+#include <level_0/utf_range.h>
+
/**
* A string that is analogous to f_utf_string_dynamic_t but intended for static-only uses.
*
#endif // _di_f_utf_string_dynamic_adjust_
/**
+ * Resize the dynamic string.
+ *
+ * @param length
+ * The new size to use.
+ * @param dynamic
+ * The string to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_utf_string_dynamic_adjust_
+ extern f_status_t f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *dynamic);
+#endif // _di_f_utf_string_dynamic_adjust_
+
+/**
+ * Append the source string onto the destination.
+ *
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_append_
+ extern f_status_t f_utf_string_dynamic_append(const f_utf_string_dynamic_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_append_
+
+/**
+ * Append the source string onto the destination.
+ *
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_append_assure_
+ extern f_status_t f_utf_string_dynamic_append_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_append_assure_
+
+/**
+ * Append the source string onto the destination.
+ *
+ * Skips over NULL characters from source when appending.
+ *
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_append_assure_nulless_
+ extern f_status_t f_utf_string_dynamic_append_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_append_assure_nulless_
+
+/**
+ * Append the source string onto the destination.
+ *
+ * Skips over NULL characters from source when appending.
+ *
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_append_nulless_
+ extern f_status_t f_utf_string_dynamic_append_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_append_nulless_
+
+/**
* Resize the dynamic string to a smaller size.
*
* This will resize making the string smaller based on (size - given length).
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to decrease size (size = 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_dynamic_decrease_by_
extern f_status_t f_utf_string_dynamic_decrease_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_dynamic_increase_
extern f_status_t f_utf_string_dynamic_increase(f_utf_string_dynamic_t *dynamic);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_dynamic_increase_by_
extern f_status_t f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic);
#endif // _di_f_utf_string_dynamic_increase_by_
/**
+ * Append the source string onto the destination with the glue in between.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_mash_
+ extern f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_mash_
+
+/**
+ * Append the source string onto the destination with the glue in between.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * Skips over NULL characters from glue and source when appending.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_mash_nulless_
+ extern f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_mash_nulless_
+
+/**
+ * Prepend the source string onto the destination with the glue in between.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_mish_
+ extern f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_mish_
+
+/**
+ * Prepend the source string onto the destination with the glue in between.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * Skips over NULL characters from glue and source when appending.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_mish_nulless_
+ extern f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_mish_nulless_
+
+/**
+ * Append the source string onto the destination, but restricted to the given range.
+ *
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_append_
+ extern f_status_t f_utf_string_dynamic_partial_append(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_append_
+
+/**
+ * Append the source string onto the destination, but only if the string is not already at the end and restricted to the given range
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_append_assure_
+ extern f_status_t f_utf_string_dynamic_partial_append_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_append_assure_
+
+/**
+ * Append the source string onto the destination, but only if the string is not already at the end and restricted to the given range
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * Skips over NULL characters from source when appending.
+ *
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_append_assure_nulless_
+ extern f_status_t f_utf_string_dynamic_partial_append_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_append_assure_nulless_
+
+/**
+ * Append the source string onto the destination, but restricted to the given range.
+ *
+ * Skips over NULL characters from source when appending.
+ *
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_append_nulless_
+ extern f_status_t f_utf_string_dynamic_partial_append_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_append_nulless_
+
+/**
+ * Append the source string onto the destination with the glue in between, but restricted to the given range.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_mash_
+ extern f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_mash_
+
+/**
+ * Append the source string onto the destination with the glue in between, but restricted to the given range.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * Skips over NULL characters from glue and source when appending.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_mash_nulless_
+ extern f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_mash_nulless_
+
+/**
+ * Prepend the source string onto the destination with the glue in between, but restricted to the given range.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_mish_
+ extern f_status_t f_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_mish_
+
+/**
+ * Prepend the source string onto the destination with the glue in between, but restricted to the given range.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * Skips over NULL characters from glue and source when appending.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_mish_nulless_
+ extern f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_mish_nulless_
+
+/**
+ * Prepend the source string onto the destination, but restricted to the given range.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_prepend_
+ extern f_status_t f_utf_string_dynamic_partial_prepend(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_prepend_
+
+/**
+ * Prepend the source string onto the destination, but only if the string is not already at the end and restricted to the given range
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_prepend_assure_
+ extern f_status_t f_utf_string_dynamic_partial_prepend_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_prepend_assure_
+
+/**
+ * Prepend the source string onto the destination, but only if the string is not already at the end and restricted to the given range
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_prepend_assure_nulless_
+ extern f_status_t f_utf_string_dynamic_partial_prepend_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_prepend_assure_nulless_
+
+/**
+ * Prepend the source string onto the destination, but restricted to the given range.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_partial_prepend_nulless_
+ extern f_status_t f_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_partial_prepend_nulless_
+
+/**
+ * Prepend the source string onto the destination.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_prepend_
+ extern f_status_t f_utf_string_dynamic_prepend(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_prepend_
+
+/**
+ * Prepend the source string onto the destination, but only if the string is not already at the beginning.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_prepend_assure_
+ extern f_status_t f_utf_string_dynamic_prepend_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_prepend_assure_
+
+/**
+ * Prepend the source string onto the destination, but only if the string is not already at the beginning.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_prepend_assure_nulless_
+ extern f_status_t f_utf_string_dynamic_prepend_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_prepend_assure_nulless_
+
+/**
+ * Prepend the source string onto the destination.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_prepend_nulless_
+ extern f_status_t f_utf_string_dynamic_prepend_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_prepend_nulless_
+
+/**
* Resize the dynamic string.
*
* @param length
* The new size to use.
- * @param dynamic
+ * @param buffer
* The string to resize.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_dynamic_resize_
- extern f_status_t f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *dynamic);
+ extern f_status_t f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *buffer);
#endif // _di_f_utf_string_dynamic_resize_
/**
+ * Seek the buffer location forward until EOL is reached.
+ *
+ * @param buffer
+ * The buffer to traverse.
+ * @param range
+ * A range within the buffer representing the start and stop locations.
+ * The start location will be incremented by seek.
+ *
+ * @return
+ * F_none on success.
+ * F_none_eos on success, but stopped at end of string.
+ * F_none_stop on success, but stopped at end of range.
+ * F_data_not_eos on success, but there was no string data to seek.
+ * F_data_not_stop on success, but the range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) if character is invalid UTF-8.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_seek_line_
+ extern f_status_t f_utf_string_dynamic_seek_line(const f_utf_string_static_t buffer, f_utf_string_range_t *range);
+#endif // _di_f_utf_string_dynamic_seek_line_
+
+/**
+ * Seek the buffer location forward until the character (1-byte wide) or EOL is reached.
+ *
+ * @param buffer
+ * The buffer to traverse.
+ * @param seek_to_this
+ * A single-width character representing a character to seek to.
+ * @param range
+ * A range within the buffer representing the start and stop locations.
+ * The start location will be incremented by seek.
+ *
+ * @return
+ * F_none on success.
+ * F_none_eos on success, but stopped at end of string.
+ * F_none_stop on success, but stopped at end of range.
+ * F_data_not_eos on success, but there was no string data to seek.
+ * F_data_not_stop on success, but the range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) if character is invalid UTF-8.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_seek_line_to_
+ extern f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, const int8_t seek_to_this, f_utf_string_range_t *range);
+#endif // _di_f_utf_string_dynamic_seek_line_to_
+
+/**
+ * Seek the buffer location forward until the character (1-byte wide) is reached.
+ *
+ * @param buffer
+ * The buffer to traverse.
+ * @param seek_to_this
+ * A single-width character representing a character to seek to.
+ * @param range
+ * A range within the buffer representing the start and stop locations.
+ * The start location will be incremented by seek.
+ *
+ * @return
+ * F_none on success.
+ * F_none_eos on success, but stopped at end of string.
+ * F_none_stop on success, but stopped at end of range.
+ * F_data_not_eos on success, but there was no string data to seek.
+ * F_data_not_stop on success, but the range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) if character is invalid UTF-8.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_seek_to_
+ extern f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, const int8_t seek_to_this, f_utf_string_range_t *range);
+#endif // _di_f_utf_string_dynamic_seek_to_
+
+/**
+ * Guarantee that an end of string (NULL) exists at the end of the string.
+ *
+ * This is intended to be used for anything requiring NULL terminated strings.
+ * This will reallocate more space if necessary.
+ *
+ * If destination size is 0, then it will be reallocated and have the NULL assigned at index 0.
+ *
+ * @param destination
+ * The new string, which will be allocated or reallocated as necessary.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if string is too large to fit into the buffer.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_terminate_
+ extern f_status_t f_utf_string_dynamic_terminate(f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_terminate_
+
+/**
+ * Guarantee that an end of string (NULL) exists at the end of the string.
+ *
+ * This ensures that the terminating NULL not only exists but is not counted in destination.used.
+ *
+ * This is intended to be used for anything requiring NULL terminated strings whose used length cannot be counted.
+ * This will reallocate more space if necessary.
+ *
+ * If destination size is 0, then it will be reallocated and have the NULL assigned at index 0.
+ *
+ * @param destination
+ * The new string, which will be allocated or reallocated as necessary.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if string is too large to fit into the buffer.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamic_terminate_after_
+ extern f_status_t f_utf_string_dynamic_terminate_after(f_utf_string_dynamic_t *destination);
+#endif // _di_f_utf_string_dynamic_terminate_after_
+
+/**
* Resize the dynamic string array.
*
* @param length
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_adjust().
*/
#ifndef _di_f_utf_string_dynamics_adjust_
extern f_status_t f_utf_string_dynamics_adjust(const f_array_length_t length, f_utf_string_dynamics_t *dynamics);
#endif // _di_f_utf_string_dynamics_adjust_
/**
+ * Append the source strings onto the destination.
+ *
+ * @param source
+ * The source strings to append.
+ * @param destination
+ * The destination strings the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_dynamics_append_
+ extern f_status_t f_utf_string_dynamics_append(const f_utf_string_dynamics_t source, f_utf_string_dynamics_t *destination);
+#endif // _di_f_utf_string_dynamics_append_
+
+/**
* Resize the dynamic string array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* F_none on success.
* F_data_not on success, but there is no reason to increase size (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_dynamics_decimate_by_
extern f_status_t f_utf_string_dynamics_decimate_by(const f_array_length_t amount, f_utf_string_dynamics_t *dynamics);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_dynamics_decrease_by_
extern f_status_t f_utf_string_dynamics_decrease_by(const f_array_length_t amount, f_utf_string_dynamics_t *dynamics);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_dynamics_increase_
extern f_status_t f_utf_string_dynamics_increase(f_utf_string_dynamics_t *dynamics);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_dynamics_increase_by_
extern f_status_t f_utf_string_dynamics_increase_by(const f_array_length_t amount, f_utf_string_dynamics_t *dynamics);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_dynamics_resize_
extern f_status_t f_utf_string_dynamics_resize(const f_array_length_t length, f_utf_string_dynamics_t *dynamics);
}
#endif // _di_f_utf_string_map_multis_adjust_
+#ifndef _di_f_utf_string_map_multis_append_
+ f_status_t f_utf_string_map_multis_append(const f_utf_string_map_multis_t source, f_utf_string_map_multis_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_utf_string_map_multis_resize(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].name.used = 0;
+ destination->array[destination->used].value.used = 0;
+
+ if (source.array[i].name.used) {
+ status = private_f_utf_string_append(source.array[i].name.string, source.array[i].name.used, &destination->array[destination->used].name);
+ if (F_status_is_error(status)) return status;
+ }
+
+ if (source.array[i].value.used) {
+ status = private_f_utf_string_dynamics_append(source.array[i].value, &destination->array[destination->used].value);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_map_multis_append_
+
#ifndef _di_f_utf_string_map_multis_decimate_by_
f_status_t f_utf_string_map_multis_decimate_by(const f_array_length_t amount, f_utf_string_map_multis_t *map_multis) {
#ifndef _di_level_0_parameter_checking_
}
#endif // _di_f_utf_string_maps_adjust_
+#ifndef _di_f_utf_string_maps_append_
+ f_status_t f_utf_string_maps_append(const f_utf_string_maps_t source, f_utf_string_maps_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not;
+
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_utf_string_maps_resize(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].name.used = 0;
+ destination->array[destination->used].value.used = 0;
+
+ if (source.array[i].name.used) {
+ status = private_f_utf_string_append(source.array[i].name.string, source.array[i].name.used, &destination->array[destination->used].name);
+ if (F_status_is_error(status)) return status;
+ }
+
+ if (source.array[i].value.used) {
+ status = private_f_utf_string_append(source.array[i].value.string, source.array[i].value.used, &destination->array[destination->used].value);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_maps_append_
+
#ifndef _di_f_utf_string_maps_decimate_by_
f_status_t f_utf_string_maps_decimate_by(const f_array_length_t amount, f_utf_string_maps_t *maps) {
#ifndef _di_level_0_parameter_checking_
#endif // _di_f_utf_string_map_multis_t_
/**
- * Resize the string map_multis array.
+ * Resize the map_multis array.
*
* @param length
* The new size to use.
* @param map_multis
- * The string map_multis array to resize.
+ * The map_multis array to resize.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_map_multis_adjust_
extern f_status_t f_utf_string_map_multis_adjust(const f_array_length_t length, f_utf_string_map_multis_t *map_multis);
#endif // _di_f_utf_string_map_multis_adjust_
/**
- * Resize the string map_multis array to a smaller size.
+ * Append the source map_multis onto the destination.
+ *
+ * @param source
+ * The source maps to append.
+ * @param destination
+ * The destination maps the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_map_multis_append_
+ f_status_t f_utf_string_map_multis_append(const f_utf_string_map_multis_t source, f_utf_string_map_multis_t *destination);
+#endif // _di_f_utf_string_map_multis_append_
+
+/**
+ * Resize the map_multis array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* If the given length is too small, then the resize will fail.
* @param amount
* A positive number representing how much to decimate the size by.
* @param map_multis
- * The string map_multis array to resize.
+ * The map_multis array to resize.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_map_multis_decimate_by_
extern f_status_t f_utf_string_map_multis_decimate_by(const f_array_length_t amount, f_utf_string_map_multis_t *map_multis);
#endif // _di_f_utf_string_map_multis_decimate_by_
/**
- * Resize the string map_multis array to a smaller size.
+ * Resize the map_multis array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* If the given length is too small, then the resize will fail.
* @param amount
* A positive number representing how much to decrease the size by.
* @param map_multis
- * The string map_multis array to resize.
+ * The map_multis array to resize.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_map_multis_decrease_by_
extern f_status_t f_utf_string_map_multis_decrease_by(const f_array_length_t amount, f_utf_string_map_multis_t *map_multis);
#endif // _di_f_utf_string_map_multis_decrease_by_
/**
- * Increase the size of the string map_multis array, but only if necessary.
+ * Increase the size of the map_multis array, but only if necessary.
*
* If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* If already set to the maximum buffer size, then the resize will fail.
*
* @param map_multis
- * The string map_multis array to resize.
+ * The map_multis array to resize.
*
* @return
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_map_multis_increase_
extern f_status_t f_utf_string_map_multis_increase(f_utf_string_map_multis_t *map_multis);
#endif // _di_f_utf_string_map_multis_increase_
/**
- * Resize the string map_multis array to a larger size.
+ * Resize the map_multis array to a larger size.
*
* This will resize making the string larger based on the given length.
* If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* @param amount
* A positive number representing how much to increase the size by.
* @param map_multis
- * The string map_multis array to resize.
+ * The map_multis array to resize.
*
* @return
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_map_multis_increase_by_
extern f_status_t f_utf_string_map_multis_increase_by(const f_array_length_t amount, f_utf_string_map_multis_t *map_multis);
#endif // _di_f_utf_string_map_multis_increase_by_
/**
- * Resize the string map_multis array.
+ * Resize the map_multis array.
*
* @param length
* The new size to use.
* @param map_multis
- * The string map_multis array to adjust.
+ * The map_multis array to adjust.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_map_multis_resize_
extern f_status_t f_utf_string_map_multis_resize(const f_array_length_t length, f_utf_string_map_multis_t *map_multis);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_maps_adjust_
extern f_status_t f_utf_string_maps_adjust(const f_array_length_t length, f_utf_string_maps_t *maps);
#endif // _di_f_utf_string_maps_adjust_
/**
+ * Append the source maps onto the destination.
+ *
+ * @param source
+ * The source maps to append.
+ * @param destination
+ * The destination maps the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_maps_append_
+ extern f_status_t f_utf_string_maps_append(const f_utf_string_maps_t source, f_utf_string_maps_t *destination);
+#endif // _di_f_utf_string_maps_append_
+
+/**
* Resize the string maps array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_maps_decimate_by_
extern f_status_t f_utf_string_maps_decimate_by(const f_array_length_t amount, f_utf_string_maps_t *maps);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_maps_decrease_by_
extern f_status_t f_utf_string_maps_decrease_by(const f_array_length_t amount, f_utf_string_maps_t *maps);
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_maps_increase_
extern f_status_t f_utf_string_maps_increase(f_utf_string_maps_t *maps);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_maps_increase_by_
extern f_status_t f_utf_string_maps_increase_by(const f_array_length_t amount, f_utf_string_maps_t *maps);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_maps_resize_
extern f_status_t f_utf_string_maps_resize(const f_array_length_t length, f_utf_string_maps_t *maps);
}
#endif // _di_f_utf_string_quantitys_adjust_
+#ifndef _di_f_utf_string_quantitys_append_
+ f_status_t f_utf_string_quantitys_append(const f_utf_string_quantitys_t source, f_utf_string_quantitys_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not;
+
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_utf_string_quantitys_adjust(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].start = source.array[i].start;
+ destination->array[destination->used].total = source.array[i].total;
+ } // for
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_quantitys_append_
+
#ifndef _di_f_utf_string_quantitys_decimate_by_
f_status_t f_utf_string_quantitys_decimate_by(const f_array_length_t amount, f_utf_string_quantitys_t *quantitys) {
#ifndef _di_level_0_parameter_checking_
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantitys_adjust_
extern f_status_t f_utf_string_quantitys_adjust(const f_array_length_t length, f_utf_string_quantitys_t *quantitys);
#endif // _di_f_utf_string_quantitys_adjust_
/**
+ * Append the source quantitys onto the destination.
+ *
+ * @param source
+ * The source quantitys to append.
+ * @param destination
+ * The destination quantitys the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_quantitys_append_
+ extern f_status_t f_utf_string_quantitys_append(const f_utf_string_quantitys_t source, f_utf_string_quantitys_t *destination);
+#endif // _di_f_utf_string_quantitys_append_
+
+/**
* Resize the string quantitys array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantitys_decimate_by_
extern f_status_t f_utf_string_quantitys_decimate_by(const f_array_length_t amount, f_utf_string_quantitys_t *quantitys);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantitys_decrease_by_
extern f_status_t f_utf_string_quantitys_decrease_by(const f_array_length_t amount, f_utf_string_quantitys_t *quantitys);
*
* @return
* F_none on success.
- * F_array_too_large (with error bit) if the new array length is too large.
*
- * F_memory_not (with error bit) on out of memory.
+ * F_array_too_large (with error bit) if the new array length is too large.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantitys_increase_
extern f_status_t f_utf_string_quantitys_increase(f_utf_string_quantitys_t *quantitys);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantitys_increase_by_
extern f_status_t f_utf_string_quantitys_increase_by(const f_array_length_t amount, f_utf_string_quantitys_t *quantitys);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantitys_resize_
extern f_status_t f_utf_string_quantitys_resize(const f_array_length_t length, f_utf_string_quantitys_t *quantitys);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantityss_adjust_
extern f_status_t f_utf_string_quantityss_adjust(const f_array_length_t length, f_utf_string_quantityss_t *quantityss);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantityss_decimate_by_
extern f_status_t f_utf_string_quantityss_decimate_by(const f_array_length_t amount, f_utf_string_quantityss_t *quantityss);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantityss_decrease_by_
extern f_status_t f_utf_string_quantityss_decrease_by(const f_array_length_t amount, f_utf_string_quantityss_t *quantityss);
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantityss_increase_
extern f_status_t f_utf_string_quantityss_increase(f_utf_string_quantityss_t *quantityss);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantityss_increase_by_
extern f_status_t f_utf_string_quantityss_increase_by(const f_array_length_t amount, f_utf_string_quantityss_t *quantityss);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_quantityss_resize_
extern f_status_t f_utf_string_quantityss_resize(const f_array_length_t length, f_utf_string_quantityss_t *quantityss);
}
#endif // _di_f_utf_string_ranges_adjust_
+#ifndef _di_f_utf_string_ranges_append_
+ f_status_t f_utf_string_ranges_append(const f_utf_string_ranges_t source, f_utf_string_ranges_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not;
+
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_utf_string_ranges_adjust(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].start = source.array[i].start;
+ destination->array[destination->used].stop = source.array[i].stop;
+ } // for
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_ranges_append_
+
#ifndef _di_f_utf_string_ranges_decimate_by_
f_status_t f_utf_string_ranges_decimate_by(const f_array_length_t amount, f_utf_string_ranges_t *ranges) {
#ifndef _di_level_0_parameter_checking_
#endif // _di_f_utf_string_ranges_adjust_
/**
+ * Append the source ranges onto the destination.
+ *
+ * @param source
+ * The source ranges to append.
+ * @param destination
+ * The destination ranges the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_ranges_append_
+ extern f_status_t f_utf_string_ranges_append(const f_utf_string_ranges_t source, f_utf_string_ranges_t *destination);
+#endif // _di_f_utf_string_ranges_append_
+
+/**
* Resize the string ranges array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_ranges_decimate_by_
extern f_status_t f_utf_string_ranges_decimate_by(const f_array_length_t amount, f_utf_string_ranges_t *ranges);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_ranges_decrease_by_
extern f_status_t f_utf_string_ranges_decrease_by(const f_array_length_t amount, f_utf_string_ranges_t *ranges);
* F_none on success.
* F_array_too_large (with error bit) if the new array length is too large.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_ranges_increase_
extern f_status_t f_utf_string_ranges_increase(f_utf_string_ranges_t *ranges);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_ranges_increase_by_
extern f_status_t f_utf_string_ranges_increase_by(const f_array_length_t amount, f_utf_string_ranges_t *ranges);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_ranges_resize_
extern f_status_t f_utf_string_ranges_resize(const f_array_length_t length, f_utf_string_ranges_t *ranges);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_rangess_adjust_
extern f_status_t f_utf_string_rangess_adjust(const f_array_length_t length, f_utf_string_rangess_t *rangess);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_rangess_decimate_by_
extern f_status_t f_utf_string_rangess_decimate_by(const f_array_length_t amount, f_utf_string_rangess_t *rangess);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_rangess_decrease_by_
extern f_status_t f_utf_string_rangess_decrease_by(const f_array_length_t amount, f_utf_string_rangess_t *rangess);
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_rangess_increase_
extern f_status_t f_utf_string_rangess_increase(f_utf_string_rangess_t *rangess);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_rangess_increase_by_
extern f_status_t f_utf_string_rangess_increase_by(const f_array_length_t amount, f_utf_string_rangess_t *rangess);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_rangess_resize_
extern f_status_t f_utf_string_rangess_resize(const f_array_length_t length, f_utf_string_rangess_t *rangess);
}
#endif // _di_f_utf_string_triples_adjust_
+#ifndef _di_f_utf_string_triples_append_
+ f_status_t f_utf_string_triples_append(const f_utf_string_triples_t source, f_utf_string_triples_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not;
+
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_utf_string_triples_adjust(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].one.used = 0;
+ destination->array[destination->used].two.used = 0;
+ destination->array[destination->used].three.used = 0;
+
+ if (source.array[i].one.used) {
+ status = private_f_utf_string_append(source.array[i].one.string, source.array[i].one.used, &destination->array[destination->used].one);
+ if (F_status_is_error(status)) return status;
+ }
+
+ if (source.array[i].two.used) {
+ status = private_f_utf_string_append(source.array[i].two.string, source.array[i].two.used, &destination->array[destination->used].two);
+ if (F_status_is_error(status)) return status;
+ }
+
+ if (source.array[i].three.used) {
+ status = private_f_utf_string_append(source.array[i].three.string, source.array[i].three.used, &destination->array[destination->used].three);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+
+ return F_none;
+ }
+#endif // _di_f_utf_string_triples_append_
+
#ifndef _di_f_utf_string_triples_decimate_by_
f_status_t f_utf_string_triples_decimate_by(const f_array_length_t amount, f_utf_string_triples_t *triples) {
#ifndef _di_level_0_parameter_checking_
return private_f_utf_string_triples_resize(length, triples);
}
-#endif // _di_f_string_triples_resize_
+#endif // _di_f_utf_string_triples_resize_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_utf_string_triples_adjust_
/**
+ * Append the source triples onto the destination.
+ *
+ * @param source
+ * The source triples to append.
+ * @param destination
+ * The destination triples the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is no reason to increase size (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_utf_string_triples_append_
+ extern f_status_t f_utf_string_triples_append(const f_utf_string_triples_t source, f_utf_string_triples_t *destination);
+#endif // _di_f_utf_string_triples_append_
+
+/**
* Resize the string triples array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_triples_decimate_by_
extern f_status_t f_utf_string_triples_decimate_by(const f_array_length_t amount, f_utf_string_triples_t *triples);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_triples_decrease_by_
extern f_status_t f_utf_string_triples_decrease_by(const f_array_length_t amount, f_utf_string_triples_t *triples);
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_triples_increase_
extern f_status_t f_utf_string_triples_increase(f_utf_string_triples_t *triples);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_triples_increase_by_
extern f_status_t f_utf_string_triples_increase_by(const f_array_length_t amount, f_utf_string_triples_t *triples);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_triples_resize_
extern f_status_t f_utf_string_triples_resize(const f_array_length_t length, f_utf_string_triples_t *triples);
}
previous = range.start;
- status = f_string_dynamic_seek_line(buffer.string, &range);
+ status = f_string_dynamic_seek_line(buffer, &range);
if (F_status_is_error(status)) {
fll_error_print(data->error, F_status_set_fine(status), "f_string_dynamic_seek_line", F_true);