Ignore:
Timestamp:
Apr 2, 2025, 11:12:18 PM (9 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
9aa8dcc
Parents:
f8913b7c
Message:

harmonize length computations to function name "len"

File:
1 edited

Legend:

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

    rf8913b7c ree70ff5  
    1010// Created On       : Fri Sep 03 11:00:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Apr  1 09:16:39 2025
    13 // Update Count     : 155
     12// Last Modified On : Wed Apr  2 23:09:11 2025
     13// Update Count     : 161
    1414//
    1515
     
    2828
    2929// Getters
    30 //static size_t inline __attribute__((always_inline)) size( char c ) { return sizeof( c ); };   // base case
    31 //static size_t inline __attribute__((always_inline)) size( wchar_t wc ) { return sizeof( wc ); }; // base case
    32 static inline size_t size( const char * cs ) { return strlen( cs ); };
    33 static inline size_t ?`len( const char * cs ) { return size( cs ); };
    34 size_t size( const string & s );
    35 size_t ?`len( const string & s ) { return size( s ); }
    36 static inline size_t strlen( const string & s ) { return size( s ); }
     30static inline size_t len( const char * cs ) { return strlen( cs ); };
     31size_t len( const string & s );
     32static inline size_t strlen( const string & s ) { return len( s ); }
    3733
    3834// RAII, assignment
     
    169165string ?+?( char c, const char * s );                                   // add a character to a copy of the string
    170166string ?+?( const char * c, const char * s );                   // copy and add with two NULL-terminated string
    171 string ?+?( const char * c, string & s );                               // copy and add with NULL-terminated string
     167string ?+?( const char * c, const string & s );                 // copy and add with NULL-terminated string
    172168string ?+?( const string & s, const char * c );                 // copy and add with NULL-terminated string
     169string ?+?( char c1, char c2 );                                                 // add two characters
    173170
    174171static inline string & strcat( string & s, const string & s2 ) { s += s2; return s; }
Note: See TracChangeset for help on using the changeset viewer.