Using start and stop ranges ended up being cumbersome.
Using length is simpler and a start range can be used by just adding to the source string before calling.
#endif
#if !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_)
- f_return_status private_fl_string_append(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
- // The start and stop point are inclusive locations, and therefore start - stop is actually 1 too few locations.
- f_string_length source_length = (stop - start) + 1;
-
- if (destination->used + source_length > f_string_max_size) return f_status_set_error(f_string_too_large);
+ f_return_status private_fl_string_append(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ if (destination->used + length > f_string_max_size) return f_status_set_error(f_string_too_large);
f_status status = f_none;
- const f_string_length total = destination->used + source_length;
+ const f_string_length total = destination->used + length;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
if (f_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source + start, source_length);
+ memcpy(destination->string + destination->used, source, length);
destination->used = total;
return f_none;
#endif // !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_)
#if !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_)
- f_return_status private_fl_string_append_nulless(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
- // The start and stop point are inclusive locations, and therefore start - stop is actually 1 too few locations.
- f_string_length source_length = (stop - start) + 1;
-
- if (destination->used + source_length > f_string_max_size) return f_status_set_error(f_string_too_large);
+ f_return_status private_fl_string_append_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ if (destination->used + length > f_string_max_size) return f_status_set_error(f_string_too_large);
f_status status = f_none;
f_string_length first = 0;
- for (f_string_length i = 0; i <= source_length; i++) {
- if (i == source_length) {
+ for (f_string_length i = 0; i <= length; i++) {
+ if (i == length) {
if (i > first) {
- f_string_length length = i - first;
+ f_string_length size = i - first;
- if (destination->used + length > f_string_max_size) return f_status_set_error(f_string_too_large);
+ if (destination->used + size > f_string_max_size) return f_status_set_error(f_string_too_large);
- f_string_length total = destination->used + length;
+ f_string_length total = destination->used + size;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
if (f_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source + start + first, length);
+ memcpy(destination->string + destination->used, source + first, size);
destination->used = total;
}
if (source[i] == f_string_eos) {
if (i > 0) {
if (i > first) {
- f_string_length length = i - first;
+ f_string_length size = i - first;
- if (destination->used + length > f_string_max_size) return f_status_set_error(f_string_too_large);
+ if (destination->used + size > f_string_max_size) return f_status_set_error(f_string_too_large);
- f_string_length total = destination->used + length;
+ f_string_length total = destination->used + size;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
if (f_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source + start + first, length);
+ memcpy(destination->string + destination->used, source + first, size);
destination->used = total;
}
}
- while (i + 1 < source_length && source[i + 1] == f_string_eos) {
+ while (i + 1 < length && source[i + 1] == f_string_eos) {
i++;
} // while
#endif // !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_)
#if !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_)
- f_return_status private_fl_string_prepend(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
- // The start and stop point are inclusive locations, and therefore start - stop is actually 1 too few locations.
- f_string_length source_length = (stop - start) + 1;
-
- if (destination->used + source_length > f_string_max_size) return f_status_set_error(f_string_too_large);
+ f_return_status private_fl_string_prepend(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ if (destination->used + length > f_string_max_size) return f_status_set_error(f_string_too_large);
f_status status = f_none;
- const f_string_length total = destination->used + source_length;
+ const f_string_length total = destination->used + length;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
}
if (destination->used > 0) {
- memmove(destination->string + source_length, destination->string, destination->used);
- memcpy(destination->string, source + start, source_length);
+ memmove(destination->string + length, destination->string, destination->used);
+ memcpy(destination->string, source, length);
}
else {
- memcpy(destination->string, source + start, source_length);
+ memcpy(destination->string, source, length);
}
destination->used = total;
#endif // !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_)
#if !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_)
- f_return_status private_fl_string_prepend_nulless(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
- // The start and stop point are inclusive locations, and therefore start - stop is actually 1 too few locations.
- f_string_length source_length = (stop - start) + 1;
-
- if (destination->used + source_length > f_string_max_size) return f_status_set_error(f_string_too_large);
+ f_return_status private_fl_string_prepend_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ if (destination->used + length > f_string_max_size) return f_status_set_error(f_string_too_large);
f_status status = f_none;
f_string_length first = 0;
f_string_length offset = 0;
- for (f_string_length i = 0; i <= source_length; i++) {
- if (i == source_length) {
+ for (f_string_length i = 0; i <= length; i++) {
+ if (i == length) {
if (i > first) {
- f_string_length length = i - first;
+ f_string_length size = i - first;
- if (destination->used + length > f_string_max_size) return f_status_set_error(f_string_too_large);
+ if (destination->used + size > f_string_max_size) return f_status_set_error(f_string_too_large);
- f_string_length total = destination->used + length;
+ f_string_length total = destination->used + size;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
if (f_status_is_error(status)) return status;
}
- memmove(destination->string + offset + length, destination->string + offset, destination->used - offset);
- memcpy(destination->string + offset, source + first, length);
+ memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
+ memcpy(destination->string + offset, source + first, size);
destination->used = total;
- offset += length;
+ offset += size;
}
break;
if (source[i] == f_string_eos) {
if (i > 0) {
if (i > first) {
- f_string_length length = i - first;
+ f_string_length size = i - first;
- if (destination->used + length > f_string_max_size) return f_status_set_error(f_string_too_large);
+ if (destination->used + size > f_string_max_size) return f_status_set_error(f_string_too_large);
- f_string_length total = destination->used + length;
+ f_string_length total = destination->used + size;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
if (f_status_is_error(status)) return status;
}
- memmove(destination->string + offset + length, destination->string + offset, destination->used - offset);
- memcpy(destination->string + offset, source + first, length);
+ memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
+ memcpy(destination->string + offset, source + first, size);
destination->used = total;
- offset += length;
+ offset += size;
}
}
- while (i + 1 < source_length && source[i + 1] == f_string_eos) {
+ while (i + 1 < length && source[i + 1] == f_string_eos) {
i++;
} // while
*
* @param source
* The source string to append.
- * @param start
- * Inclusive start point of string to append.
+ * @param length
+ * Length of source to append.
* @param stop
* Inclusive stop point of string to append.
* @param destination
* @see fl_string_dynamic_mash()
*/
#if !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_)
- extern f_return_status private_fl_string_append(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_string_append(const f_string source, const f_string_length length, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_)
/**
*
* @param source
* The source string to append.
- * @param start
- * Inclusive start point of string to append.
- * @param stop
- * Inclusive stop point of string to append.
+ * @param length
+ * Length of source to append.
* @param destination
* The destination string the source and glue are appended onto.
*
* @see fl_string_dynamic_mash_nulless()
*/
#if !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_)
- extern f_return_status private_fl_string_append_nulless(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_string_append_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_)
/**
*
* @param source
* The source string to prepend.
- * @param start
- * Inclusive start point of string to append.
- * @param stop
- * Inclusive stop point of string to append.
+ * @param length
+ * Length of source to append.
* @param destination
* The destination string the source and glue are prepended onto.
*
* @see fl_string_dynamic_prepend()
*/
#if !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_append_mish_) || !defined(_di_fl_string_dynamic_mish_)
- extern f_return_status private_fl_string_prepend(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_string_prepend(const f_string source, const f_string_length length, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_append_mish_) || !defined(_di_fl_string_dynamic_mish_)
/**
*
* @param source
* The source string to prepend.
- * @param start
- * Inclusive start point of string to append.
- * @param stop
- * Inclusive stop point of string to append.
+ * @param length
+ * Length of source to append.
* @param destination
* The destination string the source and glue are prepended onto.
*
* @see fl_string_dynamic_prepend_nulless()
*/
#if !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_) || !defined(_di_fl_string_append_mish_) || !defined(_di_fl_string_dynamic_mish_)
- extern f_return_status private_fl_string_prepend_nulless(const f_string source, f_string_length start, const f_string_length stop, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_string_prepend_nulless(const f_string source, f_string_length length, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_) || !defined(_di_fl_string_append_mish_) || !defined(_di_fl_string_dynamic_mish_)
/**
#endif
#ifndef _di_fl_string_append_
- f_return_status fl_string_append(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
+ f_return_status fl_string_append(const f_string source, const f_string_length length, f_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- return private_fl_string_append(source, start, stop, destination);
+ return private_fl_string_append(source, length, destination);
}
#endif // _di_fl_string_append_
#ifndef _di_fl_string_append_nulless_
- f_return_status fl_string_append_nulless(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
+ f_return_status fl_string_append_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- return private_fl_string_append_nulless(source, start, stop, destination);
+ return private_fl_string_append_nulless(source, length, destination);
}
#endif // _di_fl_string_append_nulless_
if (source.used == 0) return f_no_data;
- return private_fl_string_append(source.string, 0, source.used - 1, destination);
+ return private_fl_string_append(source.string, source.used, destination);
}
#endif // _di_fl_string_dynamic_append_
if (source.used == 0) return f_no_data;
- return private_fl_string_append_nulless(source.string, 0, source.used - 1, destination);
+ return private_fl_string_append_nulless(source.string, source.used, destination);
}
#endif // _di_fl_string_dynamic_append_nulless_
if (source.used == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_append(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_append(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_append(source.string, 0, source.used - 1, destination);
+ return private_fl_string_append(source.string, source.used, destination);
}
#endif // _di_fl_string_dynamic_mash_
if (source.used == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_append_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_append_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_append_nulless(source.string, 0, source.used - 1, destination);
+ return private_fl_string_append_nulless(source.string, source.used, destination);
}
#endif // _di_fl_string_dynamic_mash_nulless_
if (source.used == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_prepend(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_prepend(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_prepend(source.string, 0, source.used - 1, destination);
+ return private_fl_string_prepend(source.string, source.used, destination);
}
#endif // _di_fl_string_dynamic_mish_
if (source.used == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_prepend_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_prepend_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_prepend_nulless(source.string, 0, source.used - 1, destination);
+ return private_fl_string_prepend_nulless(source.string, source.used, destination);
}
#endif // _di_fl_string_dynamic_mish_nulless_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_string_append(source.string, range.start, range.stop, destination);
+ return private_fl_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_string_dynamic_partial_append_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_string_append_nulless(source.string, range.start, range.stop, destination);
+ return private_fl_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_string_dynamic_append_nulless_
if (range.start > range.stop) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_append(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_append(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_append(source.string, range.start, range.stop, destination);
+ return private_fl_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_string_dynamic_partial_mash_
if (range.start > range.stop) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_append_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_append_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_append_nulless(source.string, range.start, range.stop, destination);
+ return private_fl_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_string_dynamic_partial_mash_nulless_
if (range.start > range.stop) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_prepend(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_prepend(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_prepend(source.string, range.start, range.stop, destination);
+ return private_fl_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_string_dynamic_partial_mish_
if (range.start > range.stop) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_prepend_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_prepend_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_prepend_nulless(source.string, range.start, range.stop, destination);
+ return private_fl_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_string_dynamic_partial_mish_nulless_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_string_prepend(source.string, range.start, range.stop, destination);
+ return private_fl_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_string_dynamic_partial_prepend_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_string_prepend_nulless(source.string, range.start, range.stop, destination);
+ return private_fl_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_string_dynamic_partial_prepend_nulless
if (source.used == 0) return f_no_data;
- return private_fl_string_prepend(source.string, 0, source.used - 1, destination);
+ return private_fl_string_prepend(source.string, source.used, destination);
}
#endif // _di_fl_string_dynamic_prepend_
if (source.used == 0) return f_no_data;
- return private_fl_string_prepend_nulless(source.string, 0, source.used - 1, destination);
+ return private_fl_string_prepend_nulless(source.string, source.used, destination);
}
#endif // _di_fl_string_dynamic_prepend_nulless_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_string_append(source.string, range.start, range.stop, destination);
+ return private_fl_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_string_dynamic_rip_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_string_append_nulless(source.string, range.start, range.stop, destination);
+ return private_fl_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_string_dynamic_rip_nulless_
#endif // _di_fl_string_dynamic_terminate_
#ifndef _di_fl_string_mash_
- f_return_status fl_string_mash(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
+ f_return_status fl_string_mash(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_append(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_append(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_append(source, start, stop, destination);
+ return private_fl_string_append(source, length, destination);
}
#endif // _di_fl_string_mash_
#ifndef _di_fl_string_mash_nulless_
- f_return_status fl_string_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
+ f_return_status fl_string_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_append_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_append_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_append_nulless(source, start, stop, destination);
+ return private_fl_string_append_nulless(source, length, destination);
}
#endif // _di_fl_string_mash_nulless_
#ifndef _di_fl_string_mish_
- f_return_status fl_string_mish(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
+ f_return_status fl_string_mish(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_prepend(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_prepend(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_prepend(source, start, stop, destination);
+ return private_fl_string_prepend(source, length, destination);
}
#endif // _di_fl_string_mish_
#ifndef _di_fl_string_mish_nulless_
- f_return_status fl_string_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
+ f_return_status fl_string_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_prepend_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_string_prepend_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) return status;
}
- return private_fl_string_prepend_nulless(source, start, stop, destination);
+ return private_fl_string_prepend_nulless(source, length, destination);
}
#endif // _di_fl_string_mish_nulless_
#ifndef _di_fl_string_prepend_
- f_return_status fl_string_prepend(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
+ f_return_status fl_string_prepend(const f_string source, const f_string_length length, f_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- return private_fl_string_prepend(source, start, stop, destination);
+ return private_fl_string_prepend(source, length, destination);
}
#endif // _di_fl_string_prepend_
#ifndef _di_fl_string_prepend_nulless_
- f_return_status fl_string_prepend_nulless(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
+ f_return_status fl_string_prepend_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- return private_fl_string_prepend_nulless(source, start, stop, destination);
+ return private_fl_string_prepend_nulless(source, length, destination);
}
#endif // _di_fl_string_prepend_nulless_
#ifndef _di_fl_string_rip_
- f_return_status fl_string_rip(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
+ f_return_status fl_string_rip(const f_string source, const f_string_length length, f_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- f_string_length begin = start;
- f_string_length end = stop;
+ f_string_length begin = 0;
+ f_string_length end = length - 1;
f_status status = private_fl_string_rip_find_range(source, &begin, &end);
if (f_status_is_error(status)) return status;
if (status == f_no_data) return status;
- return private_fl_string_append(source, begin, end, destination);
+ return private_fl_string_append(source + begin, (end - begin) + 1, destination);
}
#endif // _di_fl_string_rip_
#ifndef _di_fl_string_rip_nulless_
- f_return_status fl_string_rip_nulless(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination) {
+ f_return_status fl_string_rip_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- f_string_length begin = start;
- f_string_length end = stop;
+ f_string_length begin = 0;
+ f_string_length end = length - 1;
f_status status = private_fl_string_rip_find_range(source, &begin, &end);
if (f_status_is_error(status)) return status;
if (status == f_no_data) return status;
- return private_fl_string_append_nulless(source, begin, end, destination);
+ return private_fl_string_append_nulless(source + begin, (end - begin) + 1, destination);
}
#endif // _di_fl_string_rip_nulless_
*
* @param source
* The source string to append.
- * @param start
- * Inclusive start point of string to append.
- * @param stop
- * Inclusive stop point of string to append.
+ * @param length
+ * The length of source to append.
* @param destination
* The destination string the source is appended onto.
*
* @see fl_string_append_nulless()
*/
#ifndef _di_fl_string_append_
- extern f_return_status fl_string_append(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination);
+ extern f_return_status fl_string_append(const f_string source, const f_string_length length, f_string_dynamic *destination);
#endif // _di_fl_string_append_
/**
*
* @param source
* The source string to append.
- * @param start
- * Inclusive start point of string to append.
- * @param stop
- * Inclusive stop point of string to append.
+ * @param length
+ * The length of source to append.
* @param destination
* The destination string the source is appended onto.
*
* @see fl_string_append()
*/
#ifndef _di_fl_string_append_nulless_
- extern f_return_status fl_string_append_nulless(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination);
+ extern f_return_status fl_string_append_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
#endif // _di_fl_string_append_nulless_
/**
* The number of bytes the glue takes up.
* @param source
* The source string to append.
- * @param start
- * Inclusive start point of string to prepend.
- * @param stop
- * Inclusive stop point of string to prepend.
+ * @param length
+ * The length of source to append.
* @param destination
* The destination string the source and glue are appended onto.
*
* @see fl_string_mash_nulless()
*/
#ifndef _di_fl_string_mash_
- extern f_return_status fl_string_mash(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination);
+ extern f_return_status fl_string_mash(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
#endif // _di_fl_string_mash_
/**
* The number of bytes the glue takes up.
* @param source
* The source string to append.
- * @param start
- * Inclusive start point of string to prepend.
- * @param stop
- * Inclusive stop point of string to prepend.
+ * @param length
+ * The length of source to append.
* @param destination
* The destination string the source and glue are appended onto.
*
* @see fl_string_mash()
*/
#ifndef _di_fl_string_mash_nulless_
- extern f_return_status fl_string_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination);
+ extern f_return_status fl_string_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
#endif // _di_fl_string_mash_nulless_
/**
* The number of bytes the glue takes up.
* @param source
* The source string to append.
- * @param start
- * Inclusive start point of string to prepend.
- * @param stop
- * Inclusive stop point of string to prepend.
+ * @param length
+ * The length of source to append.
* @param destination
* The destination string the source and glue are appended onto.
*
* @see fl_string_mish_nulless()
*/
#ifndef _di_fl_string_mish_
- extern f_return_status fl_string_mish(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination);
+ extern f_return_status fl_string_mish(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
#endif // _di_fl_string_mish_
/**
* The number of bytes the glue takes up.
* @param source
* The source string to append.
- * @param start
- * Inclusive start point of string to prepend.
- * @param stop
- * Inclusive stop point of string to prepend.
+ * @param length
+ * The length of source to append.
* @param destination
* The destination string the source and glue are appended onto.
*
* @see fl_string_mish()
*/
#ifndef _di_fl_string_mish_nulless_
- extern f_return_status fl_string_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination);
+ extern f_return_status fl_string_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
#endif // _di_fl_string_mish_nulless_
/**
*
* @param source
* The source string to prepend.
- * @param start
- * Inclusive start point of string to prepend.
- * @param stop
- * Inclusive stop point of string to prepend.
+ * @param length
+ * The length of source to append.
* @param destination
* The destination string the source is prepended onto.
*
* @see fl_string_prepend_nulless()
*/
#ifndef _di_fl_string_prepend_
- extern f_return_status fl_string_prepend(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination);
+ extern f_return_status fl_string_prepend(const f_string source, const f_string_length length, f_string_dynamic *destination);
#endif // _di_fl_string_prepend_
/**
*
* @param source
* The source string to prepend.
- * @param start
- * Inclusive start point of string to prepend.
- * @param stop
- * Inclusive stop point of string to prepend.
+ * @param length
+ * The length of source to append.
* @param destination
* The destination string the source is prepended onto.
*
* @see fl_string_dynamic_prepend()
*/
#ifndef _di_fl_string_prepend_nulless_
- extern f_return_status fl_string_prepend_nulless(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination);
+ extern f_return_status fl_string_prepend_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
#endif // _di_fl_string_prepend_nulless_
/**
* Allocate a new string from the provided range in the string.
*
* Ignores leading and trailing whitespace.
- * As a result, resulting size may be smaller than requested range.
+ * As a result, resulting size may be smaller than requested length.
*
* @param source
* The string to rip from.
- * @param start
- * An inclusive start location within string.
- * @param stop
- * An inclusive stop location within string.
+ * @param length
+ * The length of source to append.
* @param destination
* The new string, which will be allocated or reallocated as necessary.
*
* @see fl_string_rip_nulless()
*/
#ifndef _di_fl_string_rip_
- extern f_return_status fl_string_rip(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination);
+ extern f_return_status fl_string_rip(const f_string source, const f_string_length length, f_string_dynamic *destination);
#endif // _di_fl_string_rip_
/**
* Allocate a new string from the provided range in the string.
*
* Ignores leading and trailing whitespace.
- * As a result, resulting size may be smaller than requested range.
+ * As a result, resulting size may be smaller than requested length.
*
* Skips over NULL characters from source when ripping.
*
* @param source
* The string to rip from.
- * @param start
- * An inclusive start location within string.
- * @param stop
- * An inclusive stop location within string.
+ * @param length
+ * The length of source to append.
* @param destination
* The new string, which will be allocated or reallocated as necessary.
*
* @see fl_string_rip()
*/
#ifndef _di_fl_string_rip_nulless_
- extern f_return_status fl_string_rip_nulless(const f_string source, const f_string_length start, const f_string_length stop, f_string_dynamic *destination);
+ extern f_return_status fl_string_rip_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
#endif // _di_fl_string_rip_nulless_
/**
#endif
#if !defined(_di_fl_utf_string_append_) || !defined(_di_fl_utf_string_dynamic_append_) || !defined(_di_fl_utf_string_append_mash_) || !defined(_di_fl_utf_string_dynamic_mash_)
- f_return_status private_fl_utf_string_append(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
- // The start and stop point are inclusive locations, and therefore start - stop is actually 1 too few locations.
- f_utf_string_length source_length = (stop - start) + 1;
-
- if (destination->used + source_length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
+ f_return_status private_fl_utf_string_append(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ if (destination->used + length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
f_status status = f_none;
- const f_utf_string_length total = destination->used + source_length;
+ const f_utf_string_length total = destination->used + length;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
if (f_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source + start, source_length);
+ memcpy(destination->string + destination->used, source, length);
destination->used = total;
return f_none;
#endif // !defined(_di_fl_utf_string_append_) || !defined(_di_fl_utf_string_dynamic_append_) || !defined(_di_fl_utf_string_append_mash_) || !defined(_di_fl_utf_string_dynamic_mash_)
#if !defined(_di_fl_utf_string_append_nulless_) || !defined(_di_fl_utf_string_dynamic_append_nulless_) || !defined(_di_fl_utf_string_mash_nulless_) || !defined(_di_fl_utf_string_dynamic_mash_nulless_)
- f_return_status private_fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
- // The start and stop point are inclusive locations, and therefore start - stop is actually 1 too few locations.
- f_utf_string_length source_length = (stop - start) + 1;
-
- if (destination->used + source_length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
+ f_return_status private_fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ if (destination->used + length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
f_status status = f_none;
f_utf_string_length first = 0;
- for (f_utf_string_length i = 0; i <= source_length; i++) {
- if (i == source_length) {
+ for (f_utf_string_length i = 0; i <= length; i++) {
+ if (i == length) {
if (i > first) {
- f_utf_string_length length = i - first;
+ f_utf_string_length size = i - first;
- if (destination->used + length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
+ if (destination->used + size > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
- f_utf_string_length total = destination->used + length;
+ f_utf_string_length total = destination->used + size;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
if (f_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source + start + first, length);
+ memcpy(destination->string + destination->used, source + first, size);
destination->used = total;
}
if (source[i] == f_utf_character_eos) {
if (i > 0) {
if (i > first) {
- f_utf_string_length length = i - first;
+ f_utf_string_length size = i - first;
- if (destination->used + length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
+ if (destination->used + size > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
- f_utf_string_length total = destination->used + length;
+ f_utf_string_length total = destination->used + size;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
if (f_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source + start + first, length);
+ memcpy(destination->string + destination->used, source + first, size);
destination->used = total;
}
}
- while (i + 1 < source_length && source[i + 1] == f_utf_character_eos) {
+ while (i + 1 < length && source[i + 1] == f_utf_character_eos) {
i++;
} // while
#endif // !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_)
#if !defined(_di_fl_utf_string_prepend_) || !defined(_di_fl_utf_string_dynamic_prepend_)
- f_return_status private_fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
- // The start and stop point are inclusive locations, and therefore start - stop is actually 1 too few locations.
- f_utf_string_length source_length = (stop - start) + 1;
-
- if (destination->used + source_length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
+ f_return_status private_fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ if (destination->used + length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
f_status status = f_none;
- const f_utf_string_length total = destination->used + source_length;
+ const f_utf_string_length total = destination->used + length;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
}
if (destination->used > 0) {
- memmove(destination->string + source_length, destination->string, destination->used);
- memcpy(destination->string, source + start, source_length);
+ memmove(destination->string + length, destination->string, destination->used);
+ memcpy(destination->string, source, length);
}
else {
- memcpy(destination->string, source + start, source_length);
+ memcpy(destination->string, source, length);
}
destination->used = total;
#endif // !defined(_di_fl_utf_string_prepend_) || !defined(_di_fl_utf_string_dynamic_prepend_)
#if !defined(_di_fl_utf_string_prepend_nulless_) || !defined(_di_fl_utf_string_dynamic_prepend_nulless_)
- f_return_status private_fl_utf_string_prepend_nulless(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
- // The start and stop point are inclusive locations, and therefore start - stop is actually 1 too few locations.
- f_utf_string_length source_length = (stop - start) + 1;
-
- if (destination->used + source_length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
+ f_return_status private_fl_utf_string_prepend_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ if (destination->used + length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
f_status status = f_none;
f_utf_string_length first = 0;
f_utf_string_length offset = 0;
- for (f_utf_string_length i = 0; i <= source_length; i++) {
- if (i == source_length) {
+ for (f_utf_string_length i = 0; i <= length; i++) {
+ if (i == length) {
if (i > first) {
- f_utf_string_length length = i - first;
+ f_utf_string_length size = i - first;
- if (destination->used + length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
+ if (destination->used + size > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
- f_utf_string_length total = destination->used + length;
+ f_utf_string_length total = destination->used + size;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
if (f_status_is_error(status)) return status;
}
- memmove(destination->string + offset + length, destination->string + offset, destination->used - offset);
- memcpy(destination->string + offset, source + first, length);
+ memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
+ memcpy(destination->string + offset, source + first, size);
destination->used = total;
- offset += length;
+ offset += size;
}
break;
if (source[i] == f_utf_character_eos) {
if (i > 0) {
if (i > first) {
- f_utf_string_length length = i - first;
+ f_utf_string_length size = i - first;
- if (destination->used + length > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
+ if (destination->used + size > f_utf_string_max_size) return f_status_set_error(f_string_too_large);
- f_utf_string_length total = destination->used + length;
+ f_utf_string_length total = destination->used + size;
if (total > destination->size) {
f_macro_string_dynamic_resize(status, (*destination), total);
if (f_status_is_error(status)) return status;
}
- memmove(destination->string + offset + length, destination->string + offset, destination->used - offset);
- memcpy(destination->string + offset, source + first, length);
+ memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
+ memcpy(destination->string + offset, source + first, size);
destination->used = total;
- offset += length;
+ offset += size;
}
}
- while (i + 1 < source_length && source[i + 1] == f_utf_character_eos) {
+ while (i + 1 < length && source[i + 1] == f_utf_character_eos) {
i++;
} // while
*
* @param source
* The source string to append.
- * @param start
- * Inclusive start point of string to append.
- * @param stop
- * Inclusive stop point of string to append.
+ * @param length
+ * Length of source to append.
* @param destination
* The destination string the source and glue are appended onto.
*
* @see fl_utf_string_dynamic_mash()
*/
#if !defined(_di_fl_utf_string_append_) || !defined(_di_fl_utf_string_dynamic_append_) || !defined(_di_fl_utf_string_append_mash_) || !defined(_di_fl_utf_string_dynamic_mash_)
- extern f_return_status private_fl_utf_string_append(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_string_append(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_append_) || !defined(_di_fl_utf_string_dynamic_append_) || !defined(_di_fl_utf_string_append_mash_) || !defined(_di_fl_utf_string_dynamic_mash_)
/**
*
* @param source
* The source string to append.
- * @param start
- * Inclusive start point of string to append.
- * @param stop
- * Inclusive stop point of string to append.
+ * @param length
+ * Length of source to append.
* @param destination
* The destination string the source and glue are appended onto.
*
* @see fl_utf_string_dynamic_mash_nulless()
*/
#if !defined(_di_fl_utf_string_append_nulless_) || !defined(_di_fl_utf_string_dynamic_append_nulless_) || !defined(_di_fl_utf_string_mash_nulless_) || !defined(_di_fl_utf_string_dynamic_mash_nulless_)
- extern f_return_status private_fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_append_nulless_) || !defined(_di_fl_utf_string_dynamic_append_nulless_) || !defined(_di_fl_utf_string_mash_nulless_) || !defined(_di_fl_utf_string_dynamic_mash_nulless_)
/**
*
* @param source
* The source string to prepend.
- * @param start
- * Inclusive start point of string to append.
- * @param stop
- * Inclusive stop point of string to append.
+ * @param length
+ * Length of source to append.
* @param destination
* The destination string the source and glue are prepended onto.
*
* @see fl_utf_string_dynamic_prepend()
*/
#if !defined(_di_fl_utf_string_prepend_) || !defined(_di_fl_utf_string_dynamic_prepend_) || !defined(_di_fl_utf_string_append_mish_) || !defined(_di_fl_utf_string_dynamic_mish_)
- extern f_return_status private_fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_prepend_) || !defined(_di_fl_utf_string_dynamic_prepend_) || !defined(_di_fl_utf_string_append_mish_) || !defined(_di_fl_utf_string_dynamic_mish_)
/**
*
* @param source
* The source string to prepend.
- * @param start
- * Inclusive start point of string to append.
- * @param stop
- * Inclusive stop point of string to append.
+ * @param length
+ * Length of source to append.
* @param destination
* The destination string the source and glue are prepended onto.
*
* @see fl_utf_string_dynamic_prepend_nulless()
*/
#if !defined(_di_fl_utf_string_prepend_nulless_) || !defined(_di_fl_utf_string_dynamic_prepend_nulless_) || !defined(_di_fl_utf_string_append_mish_) || !defined(_di_fl_utf_string_dynamic_mish_)
- extern f_return_status private_fl_utf_string_prepend_nulless(const f_utf_string source, f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_string_prepend_nulless(const f_utf_string source, f_utf_string_length length, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_prepend_nulless_) || !defined(_di_fl_utf_string_dynamic_prepend_nulless_) || !defined(_di_fl_utf_string_append_mish_) || !defined(_di_fl_utf_string_dynamic_mish_)
/**
#endif
#ifndef _di_fl_utf_string_append_
- f_return_status fl_utf_string_append(const f_utf_string source, const f_string_length start, const f_string_length stop, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_append(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- return private_fl_utf_string_append(source, start, stop, destination);
+ return private_fl_utf_string_append(source, length, destination);
}
#endif // _di_fl_utf_string_append_
#ifndef _di_fl_utf_string_append_nulless_
- f_return_status fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- return private_fl_utf_string_append_nulless(source, start, stop, destination);
+ return private_fl_utf_string_append_nulless(source, length, destination);
}
#endif // _di_fl_utf_string_append_nulless_
if (source.used == 0) return f_no_data;
- return private_fl_utf_string_append(source.string, 0, source.used - 1, destination);
+ return private_fl_utf_string_append(source.string, source.used, destination);
}
#endif // _di_fl_utf_string_dynamic_append_
if (source.used == 0) return f_no_data;
- return private_fl_utf_string_append_nulless(source.string, 0, source.used - 1, destination);
+ return private_fl_utf_string_append_nulless(source.string, source.used, destination);
}
#endif // _di_fl_utf_string_dynamic_append_nulless_
if (source.used == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_append(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_append(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_append(source.string, 0, source.used - 1, destination);
+ return private_fl_utf_string_append(source.string, source.used, destination);
}
#endif // _di_fl_utf_string_dynamic_mash_
if (source.used == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_append_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_append_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_append_nulless(source.string, 0, source.used - 1, destination);
+ return private_fl_utf_string_append_nulless(source.string, source.used, destination);
}
#endif // _di_fl_utf_string_dynamic_mash_nulless_
if (source.used == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_prepend(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_prepend(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_prepend(source.string, 0, source.used - 1, destination);
+ return private_fl_utf_string_prepend(source.string, source.used, destination);
}
#endif // _di_fl_utf_string_dynamic_mish_
if (source.used == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_prepend_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_prepend_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_prepend_nulless(source.string, 0, source.used - 1, destination);
+ return private_fl_utf_string_prepend_nulless(source.string, source.used, destination);
}
#endif // _di_fl_utf_string_dynamic_mish_nulless_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_utf_string_append(source.string, range.start, range.stop, destination);
+ return private_fl_utf_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_utf_string_dynamic_partial_append_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_utf_string_append_nulless(source.string, range.start, range.stop, destination);
+ return private_fl_utf_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_utf_string_dynamic_partial_append_nulless_
if (range.start > range.stop) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_append(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_append(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_append(source.string, range.start, range.stop, destination);
+ return private_fl_utf_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_utf_string_dynamic_partial_mash_
if (range.start > range.stop) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_append_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_append_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_append_nulless(source.string, range.start, range.stop, destination);
+ return private_fl_utf_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_utf_string_dynamic_partial_mash_nulless_
if (range.start > range.stop) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_prepend(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_prepend(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_prepend(source.string, range.start, range.stop, destination);
+ return private_fl_utf_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_utf_string_dynamic_partial_mish_
if (range.start > range.stop) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_prepend_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_prepend_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_prepend_nulless(source.string, range.start, range.stop, destination);
+ return private_fl_utf_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_utf_string_dynamic_partial_mish_nulless_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_utf_string_prepend(source.string, range.start, range.stop, destination);
+ return private_fl_utf_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_utf_string_dynamic_partial_prepend_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_utf_string_prepend_nulless(source.string, range.start, range.stop, destination);
+ return private_fl_utf_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_utf_string_dynamic_partial_prepend_nulless_
if (source.used == 0) return f_no_data;
- return private_fl_utf_string_prepend(source.string, 0, source.used - 1, destination);
+ return private_fl_utf_string_prepend(source.string, source.used, destination);
}
#endif // _di_fl_utf_string_dynamic_prepend_
if (source.used == 0) return f_no_data;
- return private_fl_utf_string_prepend_nulless(source.string, 0, source.used - 1, destination);
+ return private_fl_utf_string_prepend_nulless(source.string, source.used, destination);
}
#endif // _di_fl_utf_string_dynamic_prepend_nulless_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_utf_string_append(source.string, range.start, range.stop, destination);
+ return private_fl_utf_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_utf_string_dynamic_rip_
if (source.used == 0) return f_no_data;
if (range.start > range.stop) return f_no_data;
- return private_fl_utf_string_append_nulless(source.string, range.start, range.stop, destination);
+ return private_fl_utf_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
}
#endif // _di_fl_utf_string_dynamic_rip_nulless_
#endif // _di_fl_utf_string_dynamic_terminate_
#ifndef _di_fl_utf_string_mash_
- f_return_status fl_utf_string_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_append(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_append(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_append(source, start, stop, destination);
+ return private_fl_utf_string_append(source, length, destination);
}
#endif // _di_fl_utf_string_mash_
#ifndef _di_fl_utf_string_mash_nulless_
- f_return_status fl_utf_string_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_append_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_append_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_append_nulless(source, start, stop, destination);
+ return private_fl_utf_string_append_nulless(source, length, destination);
}
#endif // _di_fl_utf_string_mash_nulless_
#ifndef _di_fl_utf_string_mish_
- f_return_status fl_utf_string_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_prepend(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_prepend(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_prepend(source, start, stop, destination);
+ return private_fl_utf_string_prepend(source, length, destination);
}
#endif // _di_fl_utf_string_mish_
#ifndef _di_fl_utf_string_mish_nulless_
- f_return_status fl_utf_string_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_prepend_nulless(glue, 0, glue_length - 1, destination);
+ f_status status = private_fl_utf_string_prepend_nulless(glue, glue_length, destination);
if (f_status_is_error(status)) {
return status;
}
}
- return private_fl_utf_string_prepend_nulless(source, start, stop, destination);
+ return private_fl_utf_string_prepend_nulless(source, length, destination);
}
#endif // _di_fl_utf_string_mish_nulless_
#ifndef _di_fl_utf_string_prepend_
- f_return_status fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- return private_fl_utf_string_prepend(source, start, stop, destination);
+ return private_fl_utf_string_prepend(source, length, destination);
}
#endif // _di_fl_utf_string_prepend_
#ifndef _di_fl_utf_string_prepend_nulless_
- f_return_status fl_utf_string_prepend_nulless(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_prepend_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- return private_fl_utf_string_prepend_nulless(source, start, stop, destination);
+ return private_fl_utf_string_prepend_nulless(source, length, destination);
}
#endif // _di_fl_utf_string_prepend_nulless_
#ifndef _di_fl_utf_string_rip_
- f_return_status fl_utf_string_rip(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_rip(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- f_utf_string_length begin = start;
- f_utf_string_length end = stop;
+ f_utf_string_length begin = 0;
+ f_utf_string_length end = length - 1;
f_status status = private_fl_utf_string_rip_find_range(source, &begin, &end);
if (f_status_is_error(status)) return status;
if (status == f_no_data) return status;
- return private_fl_utf_string_append(source, begin, end, destination);
+ return private_fl_utf_string_append(source + begin, (end - begin) + 1, destination);
}
#endif // _di_fl_utf_string_rip_
#ifndef _di_fl_utf_string_rip_nulless_
- f_return_status fl_utf_string_rip_nulless(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_rip_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_1_parameter_checking_
- if (start > stop) return f_no_data;
+ if (length == 0) return f_no_data;
- f_utf_string_length begin = start;
- f_utf_string_length end = stop;
+ f_utf_string_length begin = 0;
+ f_utf_string_length end = length - 1;
f_status status = private_fl_utf_string_rip_find_range(source, &begin, &end);
if (f_status_is_error(status)) return status;
if (status == f_no_data) return status;
- return private_fl_utf_string_append_nulless(source, begin, end, destination);
+ return private_fl_utf_string_append_nulless(source + begin, (end - begin) + 1, destination);
}
#endif // _di_fl_utf_string_rip_nulless_
* @see fl_utf_string_append_nulless()
*/
#ifndef _di_fl_utf_string_append_
- extern f_return_status fl_utf_string_append(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_append(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
#endif // _di_fl_utf_string_append_
/**
* @see fl_utf_string_append()
*/
#ifndef _di_fl_utf_string_append_nulless_
- extern f_return_status fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
#endif // _di_fl_utf_string_append_nulless_
/**
* @see fl_utf_string_mash_nulless()
*/
#ifndef _di_fl_utf_string_mash_
- extern f_return_status fl_utf_string_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
#endif // _di_fl_utf_string_mash_
/**
* @see fl_utf_string_mash()
*/
#ifndef _di_fl_utf_string_mash_nulless_
- extern f_return_status fl_utf_string_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
#endif // _di_fl_utf_string_mash_nulless_
/**
* @see fl_utf_string_mish_nulless()
*/
#ifndef _di_fl_utf_string_mish_
- extern f_return_status fl_utf_string_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
#endif // _di_fl_utf_string_mish_
/**
* @see fl_utf_string_mish()
*/
#ifndef _di_fl_utf_string_mish_nulless_
- extern f_return_status fl_utf_string_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
#endif // _di_fl_utf_string_mish_nulless_
/**
* @see fl_utf_string_prepend_nulless()
*/
#ifndef _di_fl_utf_string_prepend_
- extern f_return_status fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
#endif // _di_fl_utf_string_prepend_
/**
* @see fl_utf_string_prepend()
*/
#ifndef _di_fl_utf_string_prepend_nulless_
- extern f_return_status fl_utf_string_prepend_nulless(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_prepend_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
#endif // _di_fl_utf_string_prepend_nulless_
/**
* @see fl_utf_string_rip_nulless()
*/
#ifndef _di_fl_utf_string_rip_
- extern f_return_status fl_utf_string_rip(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_rip(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
#endif // _di_fl_utf_string_rip_
/**
* @see fl_utf_string_append()
*/
#ifndef _di_fl_utf_string_rip_nulless_
- extern f_return_status fl_utf_string_rip_nulless(const f_utf_string source, const f_utf_string_length start, const f_utf_string_length stop, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_rip_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
#endif // _di_fl_utf_string_rip_nulless_
/**
f_string_dynamic argument = f_string_dynamic_initialize;
- status = fl_string_append(source, 0, length - 1, &argument);
+ status = fl_string_append(source, length, &argument);
if (f_status_is_error(status)) {
f_macro_string_dynamic_delete_simple(argument);
return status;
f_string_dynamic argument = f_string_dynamic_initialize;
if (prefix_length > 0) {
- status = fl_string_append(prefix, 0, prefix_length - 1, &argument);
+ status = fl_string_append(prefix, prefix_length, &argument);
if (f_status_is_error(status)) {
f_macro_string_dynamic_delete_simple(argument);
return status;
}
}
- status = fl_string_append(name, 0, name_length - 1, &argument);
+ status = fl_string_append(name, name_length, &argument);
if (f_status_is_error(status)) {
f_macro_string_dynamic_delete_simple(argument);
return status;
f_macro_string_dynamic_clear(argument);
- status = fl_string_append(value, 0, value_length - 1, &argument);
+ status = fl_string_append(value, value_length, &argument);
if (f_status_is_error(status)) {
f_macro_string_dynamic_delete_simple(argument);
return status;
if (length > 0) {
f_string_dynamic ripped = f_string_dynamic_initialize;
- status = fl_string_append(argv[additional.array[i]], 0, length - 1, &ripped);
+ status = fl_string_append(argv[additional.array[i]], length, &ripped);
if (f_status_is_error(status)) return status;
length = strnlen(argv[additional.array[i]], f_console_max_size);
if (length > 0) {
- status = fl_string_mash(glue, glue_length, argv[additional.array[i]], 0, length - 1, destination);
+ status = fl_string_mash(glue, glue_length, argv[additional.array[i]], length, destination);
if (f_status_is_error(status)) return f_status_set_error(f_string_too_large);
}
if (length > 0) {
f_string_dynamic ripped = f_string_dynamic_initialize;
- status = fl_string_rip(argv[additional.array[i]], 0, length - 1, &ripped);
+ status = fl_string_rip(argv[additional.array[i]], length, &ripped);
if (f_status_is_error(status)) return status;
length = strnlen(argv[additional.array[i]], f_console_max_size);
if (length > 0) {
- status = fl_string_rip(argv[additional.array[i]], 0, length - 1, &ripped);
+ status = fl_string_rip(argv[additional.array[i]], length, &ripped);
if (f_status_is_error(status)) {
f_macro_string_dynamic_delete_simple(ripped);
f_string_length length = strnlen(arguments.argv[location], f_console_max_size);
if (length > 0) {
- status = fl_string_append(arguments.argv[location], 0, length - 1, parameter_values[i]);
+ status = fl_string_append(arguments.argv[location], length, parameter_values[i]);
if (f_status_is_error(status)) {
if (status == f_status_set_error(f_string_too_large)) {
depths->array[i].index_name = data.parameters[fss_basic_list_read_parameter_name].additional.array[position_name];
if (data.parameters[fss_basic_list_read_parameter_trim].result == f_console_result_found) {
- status = fl_string_rip(arguments.argv[depths->array[i].index_name], 0, strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
+ status = fl_string_rip(arguments.argv[depths->array[i].index_name], strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
}
else {
- status = fl_string_append(arguments.argv[depths->array[i].index_name], 0, strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
+ status = fl_string_append(arguments.argv[depths->array[i].index_name], strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
}
if (f_status_is_error(status)) {
depths->array[i].index_name = data.parameters[fss_basic_read_parameter_name].additional.array[position_name];
if (data.parameters[fss_basic_read_parameter_trim].result == f_console_result_found) {
- status = fl_string_rip(arguments.argv[depths->array[i].index_name], 0, strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
+ status = fl_string_rip(arguments.argv[depths->array[i].index_name], strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
}
else {
- status = fl_string_append(arguments.argv[depths->array[i].index_name], 0, strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
+ status = fl_string_append(arguments.argv[depths->array[i].index_name], strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
}
if (f_status_is_error(status)) {
depths->array[i].index_name = data.parameters[fss_extended_list_read_parameter_name].additional.array[position_name];
if (data.parameters[fss_extended_list_read_parameter_trim].result == f_console_result_found) {
- status = fl_string_rip(arguments.argv[depths->array[i].index_name], 0, strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
+ status = fl_string_rip(arguments.argv[depths->array[i].index_name], strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
}
else {
- status = fl_string_append(arguments.argv[depths->array[i].index_name], 0, strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
+ status = fl_string_append(arguments.argv[depths->array[i].index_name], strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
}
if (f_status_is_error(status)) {
depths->array[i].index_name = data.parameters[fss_extended_read_parameter_name].additional.array[position_name];
if (data.parameters[fss_extended_read_parameter_trim].result == f_console_result_found) {
- status = fl_string_rip(arguments.argv[depths->array[i].index_name], 0, strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
+ status = fl_string_rip(arguments.argv[depths->array[i].index_name], strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
}
else {
- status = fl_string_append(arguments.argv[depths->array[i].index_name], 0, strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
+ status = fl_string_append(arguments.argv[depths->array[i].index_name], strlen(arguments.argv[depths->array[i].index_name]), &depths->array[i].value_name);
}
if (f_status_is_error(status)) {