GRASS 8 Programmer's Manual 8.6.0dev(2026)-55de52a352
Loading...
Searching...
No Matches
trim_dec.c File Reference

GIS Library - Trim string decimal functions. More...

#include <string.h>
#include <grass/gis.h>
Include dependency graph for trim_dec.c:

Go to the source code of this file.

Functions

void G_trim_decimal (char *buf)
 Removes trailing zeros from decimal number.
 

Detailed Description

GIS Library - Trim string decimal functions.

SPDX-FileCopyrightText: 2001-2009 GRASS Development Team SPDX-License-Identifier: GPL-2.0-or-later

Author
Original author CERL

Definition in file trim_dec.c.

Function Documentation

◆ G_trim_decimal()

void G_trim_decimal ( char buf)

Removes trailing zeros from decimal number.

Example: 23.45000 would come back as 23.45

Parameters
[in,out]buf

Definition at line 22 of file trim_dec.c.

Referenced by db_convert_value_to_string(), Rast3d_write_cats(), and Vect_write_ascii().