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

Subversion Repositories thor

[/] [thor/] [trunk/] [FT64v5/] [software/] [CC64/] [source/] [LTRIM.Cpp] - Blame information for rev 48

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 48 robfinch
#include "stdafx.h"
2
#include 
3
 
4
/* --------------------------------------------------------------------------
5
   Description :
6
      Trims spaces from the left side of a string. Spaces are anything
7
   considered to be a space character by the isspace() function.
8
-------------------------------------------------------------------------- */
9
 
10
char *ltrim(char *str)
11
{
12
   int ii = 0;
13
   int nn;
14
 
15
   while(isspace(str[ii])) ii++;
16
   for (nn = 0; str[ii]; nn++, ii++)
17
      str[nn] = str[ii];
18
   str[nn] = '\0';
19
   return str;
20
}
21
 

powered by: WebSVN 2.1.0

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