Lines Matching refs:rep

139 sc_string_old::sc_string_old( int size ) : rep( new sc_string_rep(size) )
143 sc_string_old::sc_string_old( const char* s ) : rep( new sc_string_rep(s) )
148 rep( new sc_string_rep( s, n ) )
152 sc_string_old::sc_string_old( const sc_string_old& s ) : rep( s.rep )
154 rep->ref_count ++;
157 sc_string_old::sc_string_old( sc_string_rep* r ) : rep(r)
166 if( -- (rep->ref_count) == 0 ) {
167 delete rep;
175 return strlen(rep->str);
183 strcpy( r->str, rep->str );
192 strcpy( r->str, rep->str );
213 strcpy( r->str, rep->str );
214 strcpy( r->str + len, s.rep->str );
221 if (rep->ref_count > 1) {
222 --rep->ref_count;
223 rep = new sc_string_rep(s);
226 rep->set_string(s);
236 if (--(rep->ref_count) == 0)
237 delete rep;
238 rep = s.rep;
239 rep->ref_count++;
248 if (rep->ref_count > 1) {
249 sc_string_rep* oldrep = rep;
250 --rep->ref_count;
251 rep = new sc_string_rep( oldlen + slen + 1 );
252 strcpy( rep->str, oldrep->str );
253 strcpy( rep->str + oldlen, s );
256 rep->resize( oldlen + slen + 1 );
257 strcpy( rep->str + oldlen, s );
265 if (rep->ref_count > 1) {
266 sc_string_rep* oldrep = rep;
267 --rep->ref_count;
268 rep = new sc_string_rep( oldlen + 2 );
269 strcpy( rep->str, oldrep->str );
270 rep->str[oldlen]=c;
271 rep->str[oldlen+1]=00;
274 rep->resize( oldlen + 2 );
275 rep->str[oldlen]=c;
276 rep->str[oldlen+1]=00;
284 return this->operator+=( s.rep->str );
290 return strcmp( rep->str, s );
296 return strcmp( rep->str, s.rep->str );
301 return rep->str;
309 return sc_string_old(rep->str+first, last-first+1);
324 return strcmp( rep->str, s ) op 0; \
328 return strcmp( rep->str, s.rep->str ) op 0; \
340 return rep->str;
346 return rep->str[i];
351 if (rep->ref_count > 1) {
352 rep->ref_count--;
353 rep = new sc_string_rep(rep->str);
355 return rep->str[i];
361 if (rep->ref_count > 1) {
362 rep->ref_count--;
363 rep = new sc_string_rep(rep->str);
365 rep->str[i] = c;
417 os << rep->str;
447 if(rep->str[result]=='.') // precision
512 return str.contains(rep->str[index]);
522 found = rep->str[i++]==c;
533 char c = temp.rep->str[i];
535 temp.rep->str[i] = static_cast<char>( c-32 );
547 char c = temp.rep->str[i];
549 temp.rep->str[i] = static_cast<char>( c+32 );
560 if( s.rep->ref_count > 1 ) {
561 -- s.rep->ref_count;
562 s.rep = new sc_string_rep;
566 char* p = s.rep->str;
574 if( i > s.rep->alloc - 2 ) {
575 s.rep->str[i] = '\0';
576 s.rep->resize( (int) (s.rep->alloc * 1.5) );
577 p = s.rep->str + i;