 
            
            
            
            
                25 Sep
                
                    2025
                
            
            
                25 Sep
                
                '25
                
            
            
            
        
    
                11:15 a.m.
            
        Klemens Morgenstern wrote:
Sure, but that argument cuts both ways. That is, it's cheap enough for the constructor, but it's also cheap enough for the `size` function depending on the application.
You need strlen for more than size(). It's also needed in end(), operator[], at(), remove_prefix, substr (both overloads), the find functions taking a start offset, back(), actually everything taking a start offset, ends_with, and probably others as well.