Logo Search packages:      
Sourcecode: bglibs version File versions

void str_lcut ( str s,
unsigned  count 
)

Cut count bytes from the left (front) of the string

Definition at line 30 of file cut.c.

References len, s, and str_truncate().

{
  unsigned newlen;
  newlen = (s->len < count) ? 0 : s->len - count;
  if (count > s->len)
    newlen = 0;
  else {
    newlen = s->len - count;
    memmove(s->s, s->s+count, newlen);
  }
  str_truncate(s, newlen);
}


Generated by  Doxygen 1.6.0   Back to index