MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / gmt_chop

Function gmt_chop

src/gmt_common_string.c:93–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void gmt_chop (char *string) {
94 /* Chops off any CR or LF and terminates string */
95 char *p;
96 assert (string != NULL); /* NULL pointer */
97 /* if (string == NULL) return; / NULL pointer */
98 if ((p = strpbrk (string, "\r\n")))
99 /* Overwrite 1st CR or LF with terminate string */
100 *p = '\0';
101}
102
103char *gmt_get_ext (const char *string) {
104 /* Returns a pointer to the filename extension (e.g., .ps) or NULL if not found. */

Callers 15

gmt_plotinitFunction · 0.85
gmt_read_listFunction · 0.85
gmt_getfillFunction · 0.85
gmt_getfontFunction · 0.85
gmt_getpenFunction · 0.85
gmtlib_read_cptFunction · 0.85
gmt_load_macrosFunction · 0.85
GMT_insetFunction · 0.85
gmtremote_data_loadFunction · 0.85
gmtapi_read_matrixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected