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

Function isValidObjectName

Engine/source/console/simManager.cpp:510–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510bool isValidObjectName( const char* name )
511{
512 if( !name || !name[ 0 ] )
513 return true; // Anonymous object.
514
515 if( !dIsalpha( name[ 0 ] ) && name[ 0 ] != '_' )
516 return false;
517
518 for( U32 i = 1; name[ i ]; ++ i )
519 if( !dIsalnum( name[ i ] ) && name[ i ] != '_' )
520 return false;
521
522 return true;
523}
524
525//---------------------------------------------------------------------------
526//---------------------------------------------------------------------------

Callers 5

EditorFunction · 0.85
EditorFunction · 0.85
sim.cppFile · 0.85

Calls 2

dIsalphaFunction · 0.85
dIsalnumFunction · 0.85

Tested by

no test coverage detected