Start by just using comp.GetName(0). It will return a string. See what that string is, then decide what to do with it. Split, parse, or whatever it is you are trying to get from the name.
GetName returns the Id of the component. You can see what that looks like by selecting any component and viewing its properties. The property name is Id. Unless it's an off-page connector, or some other component that has a property called Name. Then it returns the value of the Name property.