hm_getprefixbasenamesuffixforgivencompname

Returns the split name as prefix, base name and suffix for the specified component name and separator.

Syntax

hm_getprefixbasenamesuffixforgivencompname name separator

Type

HyperMesh Tcl Query Command

Description

Returns the split name as prefix, base name and suffix for the specified component name and separator.

Inputs

name
The name of the component.
separator
The character to be used to split the component name. The prefix is everything before the first instance of this character, the suffix is everything alphanumeric after the second instance of this character, and the base name is everything in between.

Examples

To get the prefix, base name, and suffix for a given name using - as the separator:

hm_getprefixbasenamesuffixforgivencompname abc-defgh-ijk.123 "-"
  {abc defgh ijk}

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

2020.1