MCPcopy Create free account
hub / github.com/KiCad/kicad-source-mirror / TitleCaps

Function TitleCaps

common/string_utils.cpp:397–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395
396
397wxString TitleCaps( const wxString& aString )
398{
399 wxArrayString words;
400 wxString result;
401
402 wxStringSplit( aString, words, ' ' );
403
404 result.reserve( aString.length() );
405
406 for( const wxString& word : words )
407 {
408 if( !result.IsEmpty() )
409 result += wxT( " " );
410
411 result += word.Capitalize();
412 }
413
414 return result;
415}
416
417
418wxString InitialCaps( const wxString& aString )

Callers 2

editFieldTextMethod · 0.85
editFieldPropertiesMethod · 0.85

Calls 3

wxStringSplitFunction · 0.85
lengthMethod · 0.45
IsEmptyMethod · 0.45

Tested by

no test coverage detected