Lines Matching refs:pos
290 Simstr::insert(int pos, char c) in insert() argument
292 if (pos < 0 || pos > len) in insert()
297 memcpy(result,sz,pos); in insert()
298 result[pos] = c; in insert()
299 memcpy(result+pos+1,sz+pos,len-pos+1); in insert()
334 Simstr::insert(int pos, const Simstr & S) in insert() argument
336 if (pos < 0 || pos > len) in insert()
341 memcpy(result,sz,pos); in insert()
342 memcpy(result+pos,S.sz,S.len); in insert()
343 memcpy(result+pos+S.len,sz+pos,len-pos+1); in insert()
380 Simstr::remove(int pos, int anzahl) in remove() argument
382 if (pos >= len || pos < 0 || anzahl < 1) in remove()
385 int anz = len - pos < anzahl ? len - pos : anzahl; in remove()
389 memcpy(result,sz,pos); in remove()
390 memcpy(result+pos,sz+pos+anz,len-pos-anz+1); in remove()
470 int pos; in remove_all() local
471 while ( (pos=pos_first(S)) != NO_POS ) in remove_all()
472 remove(pos,S.len); in remove_all()
526 int pos = pos_first(c); in take_first_token() local
527 if (pos != NO_POS) in take_first_token()
529 ret = get_front(pos); in take_first_token()
530 pop_front(pos+1); in take_first_token()
548 int pos = pos_last(c); in take_last_token() local
549 if (pos != NO_POS) in take_last_token()
551 ret = get_back(len-pos-1); in take_last_token()
552 pop_back(len-pos); in take_last_token()
660 Simstr::replace(int pos, char c) in replace() argument
662 if (pos < 0 || pos >= len) in replace()
665 sz[unsigned(pos)] = c; in replace()