OpenCores
URL https://opencores.org/ocsvn/thor/thor/trunk

Subversion Repositories thor

[/] [thor/] [trunk/] [FT64v5/] [software/] [CC64/] [source/] [LTRIM.Cpp] - Rev 55

Go to most recent revision | Compare with Previous | Blame | View Log

#include "stdafx.h"
#include <ctype.h>

/* --------------------------------------------------------------------------
   Description :
      Trims spaces from the left side of a string. Spaces are anything
   considered to be a space character by the isspace() function.
-------------------------------------------------------------------------- */

char *ltrim(char *str)
{
   int ii = 0;
   int nn;

   while(isspace(str[ii])) ii++;
   for (nn = 0; str[ii]; nn++, ii++)
      str[nn] = str[ii];
   str[nn] = '\0';
   return str;
}

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.