SDT-base Contents   Functions      PDF Index |
Purpose
String handling functions for the Structural Dynamics Toolbox.
Syntax
See details below
Description
The user interfaces of the Structural Dynamics Toolbox have a number of string handling needs which have been grouped in the comstr function. The appropriate formats and usual place of use are indicated below.
String comparison. 1 is returned if the first characters of Cam contain the complete 'string'. 0 is returned otherwise. This call is used extensively for command parsing. Note that istrue is output in format double and not logical. See also strncmp.
Next string match and parameter extraction. comstr finds the first character where lower(CAM) differs from string. Reads the remaining string using the sscanf specified format. Returns opt the result of sscanf and CAM the remaining characters that could not be read with the given format.
[opt,CAM,Cam]=comstr(CAM,'string','%c') is used to eliminate the matching part of string.
Command segmentation with removal of front and tail blanks. The first ind characters of the string command in capitals CAM are eliminated. The front and tail blanks are eliminated. Cam is a lowercase version of CAM. This call to comstr is used in all UI command functions for command segmentation.
Option parameter evaluation. The string CAM is evaluated for numerical values which are output in the row vector opt. If a set of default values default is given any unspecified value in opt will be set to the default.
Return the standard date string. Used by ufwrite, naswrite, etc. See also date, datenum.
Fills the string CAM with blanks up to nc characters.
Formatted output of Matrix, the format is repeated as many times as Matrix has columns and a formatted output to fid (default is 1 standard output). For example you might use comstr(ii_mac(md1,md2)*100,[-5 1],'%6.0f').
used for dynamic messaging on the command line. On UNIX platforms (the backspace does not work properly on Windows), the string st1 is erased before 'string' is displayed.
This has been moved to vhandle.tab.
Checks whether provided string st1 is valid to be a structure field. Output i0 is a boolean, true if valid, false otherwise. Output st2 is equal to input st1 if the string is valid. If not, st2 is an alternative valid suggestion based on st1.
See also