-/*
- * Convert a floating point value to a string, limited to the given
- * number of decimal digits.
- *
- * @param value The value to convert.
- * @param digits Number of digits after the decimal point to print.
- * @param result Pointer to store result.
- *
- * The string is allocated by the function and must be freed by the caller
- * after use by calling g_free().
- *
- * @retval SR_OK
- *
- * @since 0.4.0
- */
-SR_API int sr_analog_float_to_string(float value, int digits, char **result)
-{
- int cnt, i;
-
- /* This produces at least one too many digits */
- *result = g_strdup_printf("%.*f", digits, value);
- for (i = 0, cnt = 0; (*result)[i]; i++) {
- if (isdigit((*result)[i++]))
- cnt++;
- if (cnt == digits) {
- (*result)[i] = 0;
- break;
- }
- }
-
- return SR_OK;
-}
-
-/*