MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / isValidObjectName

Function isValidObjectName

Engine/source/console/simManager.cpp:519–532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517}
518
519bool isValidObjectName( const char* name )
520{
521 if( !name || !name[ 0 ] )
522 return true; // Anonymous object.
523
524 if( !dIsalpha( name[ 0 ] ) && name[ 0 ] != '_' )
525 return false;
526
527 for( U32 i = 1; name[ i ]; ++ i )
528 if( !dIsalnum( name[ i ] ) && name[ i ] != '_' )
529 return false;
530
531 return true;
532}
533
534//---------------------------------------------------------------------------
535//---------------------------------------------------------------------------

Callers 1

sim.cppFile · 0.85

Calls 2

dIsalphaFunction · 0.85
dIsalnumFunction · 0.85

Tested by

no test coverage detected