SiMX Help‎ > ‎The Target Platform‎ > ‎Objects‎ > ‎TARGET Object‎ > ‎target.strlib‎ > ‎

GetName


Platform Objects


Description

This function parses a name and breaks it up into its component parts. You give an input string which contains only a name and then set output parameters which are variables that will contain the different parts of the name.

Syntax


target.strlib.GetName input, f_name, l_name, prefix, middle, suffix

          input - String to be parsed
f_name (output) - First Name
l_name (output) - Last Name
prefix (optional, output) - Prefix, for example, Mr. or Mrs.
middle (optional, output) - Middle Name
suffix (optional, output) - Suffix, for example, Jr. or Ph.D.

Return value


This function returns a series of strings.

Sample

'---------- Start ----------
Function Start
Dim str, fn, ln, pf, mn, sf

str = "Dr. Robert Hutchings Goddard Ph.D."
target.strlib.GetName str, fn, ln, pf, mn, sf
trg.Message( fn&" "&mn&" "&ln )

End Function

         
In this case GetName parses the input string which contains only the name and extracts the various parts in that           name. Then at the end the first, middle, and last names are displayed.  

Sample

Platform Objects and Methods
Trim
Split
Mid