string_suffix.c 448 B

123456789101112131415161718192021222324
  1. /*
  2. * string_suffix.c
  3. */
  4. #include "private.h"
  5. #include "lub/ctype.h"
  6. /*--------------------------------------------------------- */
  7. const char *
  8. lub_string_suffix(const char *string)
  9. {
  10. const char *p1,*p2;
  11. p1 = p2 = string;
  12. while(*p1)
  13. {
  14. if(lub_ctype_isspace(*p1))
  15. {
  16. p2 = p1;
  17. p2++;
  18. }
  19. p1++;
  20. }
  21. return p2;
  22. }
  23. /*--------------------------------------------------------- */