PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ stringbuffer_trim_trailing_white()

int stringbuffer_trim_trailing_white ( stringbuffer_t s)
extern

Trims whitespace off the end of the stringbuffer.

Returns the number of characters trimmed.

Definition at line 232 of file stringbuffer.c.

233{
234 char *ptr = s->str_end;
235 int dist = 0;
236
237 /* Roll backwards until we hit a non-space. */
238 while( ptr > s->str_start )
239 {
240 ptr--;
241 if( (*ptr == ' ') || (*ptr == '\t') )
242 {
243 continue;
244 }
245 else
246 {
247 ptr++;
248 dist = s->str_end - ptr;
249 *ptr = '\0';
250 s->str_end = ptr;
251 return dist;
252 }
253 }
254 return dist;
255}
char * s
Definition cu_in_wkt.c:23

References s.