Ignore:
Timestamp:
Jan 19, 2024, 5:25:28 PM (6 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
8abe4090, a4ed165
Parents:
dd10bf4
Message:

Implement string initialization and assignment from various numeric types

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/collections/string.hfa

    rdd10bf4 rf2898df  
    4040void ?{}(string & s, const char * c); // copy from string literal (NULL-terminated)
    4141void ?{}(string & s, const char * c, size_t size); // copy specific length from buffer
     42
     43void ?{}( string & s, ssize_t rhs );
     44void ?{}( string & s, size_t rhs );
     45void ?{}( string & s, double rhs );
     46void ?{}( string & s, long double rhs );
     47void ?{}( string & s, double _Complex rhs );
     48void ?{}( string & s, long double _Complex rhs );
    4249
    4350string & ?=?(string & s, const string & c);
     
    5259static inline string & strcpy(string & s, const string & c) { s = c; return s; }
    5360static inline string & strncpy(string & s, const string & c, size_t n) { assign(s, c, n); return s; }
     61
     62string & ?=?( string & s, ssize_t rhs );
     63string & ?=?( string & s, size_t rhs );
     64string & ?=?( string & s, double rhs );
     65string & ?=?( string & s, long double rhs );
     66string & ?=?( string & s, double _Complex rhs );
     67string & ?=?( string & s, long double _Complex rhs );
    5468
    5569void ^?{}(string & s);
Note: See TracChangeset for help on using the changeset viewer.