MCPcopy Index your code
hub / github.com/MapServer/MapServer / msStringTrimEOL

Function msStringTrimEOL

mapstring.c:505–515  ·  view source on GitHub ↗

------------------------------------------------------------------------------- */ Trims end-of-line marker from a string */ Usefull in conjunction with fgets() calls */ ------------------------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

503/* Usefull in conjunction with fgets() calls */
504/* ------------------------------------------------------------------------------- */
505void msStringTrimEOL(char *string)
506{
507 int i;
508
509 for(i=0 ; string[i] != '\0'; i++) {
510 if(string[i] == '\n') {
511 string[i] = '\0'; /* Terminate the string at the newline */
512 return;
513 }
514 }
515}
516
517/* ------------------------------------------------------------------------------- */
518/* Replace all occurances of old with new in str. */

Callers 1

msCSVJoinConnectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected