util.KeyValuesToTable
Example
Example usage and output of this function. Note how there's only one "solid" key in the table despite the fact that input string contains multiple.
local ModelInfo = util.GetModelInfo("models/combine_gate_vehicle.mdl" )
PrintTable( util.KeyValuesToTable( ModelInfo.KeyValues ) )
Output:
editparams:
rootname =
totalmass = 1
solid:
damping = 0
index = 4
inertia = 1
mass = 1
name = Vehicle_Gate.Gate1_L
rotdamping = 0
surfaceprop = metal
volume = 68522.8828125