#endif // _di_f_string_append_
/**
- * Append the source string onto the destination, but only if the string is not already at the end.
+ * Append the source string onto the destination only if the string is not already at the end.
*
* This ignores NULL characters when comparing both the source and the destination.
*
#endif // _di_f_string_append_assure_
/**
- * Append the source string onto the destination, but only if the string is not already at the end.
+ * Append the source string onto the destination 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.
#endif // _di_f_string_prepend_
/**
- * Prepend the source string onto the destination, but only if the string is not already at the beginning.
+ * Prepend the source string onto the destination 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.
*
#endif // _di_f_string_prepend_assure_
/**
- * Prepend the source string onto the destination, but only if the string is not already at the beginning.
+ * Prepend the source string onto the destination 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.
*
for (; destination->used; --destination->used) {
if (!destination->string[destination->used - 1]) continue;
+
break;
} // for
}
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_string_dynamic_resize(total, destination);
+ if (destination->used + 1 > destination->size) {
+ const f_status_t status = private_f_string_dynamic_resize(destination->used + F_memory_default_allocation_small_d, destination);
if (F_status_is_error(status)) return status;
}
destination->string[destination->used] = 0;
- destination->used = total - 1;
return F_none;
}
#endif // _di_f_string_dynamic_append_
/**
- * Append the source string onto the destination.
+ * Append the source string onto the destination only if the string is not already at the end.
*
* @param source
* The source string to append.
#endif // _di_f_string_dynamic_append_assure_
/**
- * Append the source string onto the destination.
+ * Append the source string onto the destination only if the string is not already at the end.
*
* Skips over NULL characters from source when appending.
*
#endif // _di_f_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
+ * Append the source string onto the destination 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.
*
#endif // _di_f_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
+ * Append the source string onto the destination 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.
*
#endif // _di_f_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 the source string onto the destination only if the string is not already at the beginning and restricted to the given range.
*
* Prepend operations require memory move operations and are therefore likely more expensive than append operations.
*
#endif // _di_f_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 the source string onto the destination only if the string is not already at the beginning and restricted to the given range.
*
* Prepend operations require memory move operations and are therefore likely more expensive than append operations.
*
#endif // _di_f_string_dynamic_prepend_
/**
- * Prepend the source string onto the destination, but only if the string is not already at the beginning.
+ * Prepend the source string onto the destination 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.
*
#endif // _di_f_string_dynamic_prepend_assure_
/**
- * Prepend the source string onto the destination, but only if the string is not already at the beginning.
+ * Prepend the source string onto the destination 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.
*