split — Split string variables into parts
Split string variables into partsSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsAcknowledgmentsAlso seeSyntaxsplitstrvar[if][in][,options]op tionsDescriptionMaingenerate(stub)begin new variable names withstub; default isstrvarparse(parsestrings)parse on specified strings; default is to parse on spaceslimit(#)create a maximum of#new variablesnotrimdo not trim leading or trailing spaces of original variableDestringdestringapplydestringto new string variables , replacing initial stringvariables with numeric variables where possibleignore("chars")remove specified nonnumeric charactersforceconvert nonnumeric strings to missing valuesfloatgenerate numeric variables as typefloatpercentconvert percent variables to fractional formMenuData>Create or change data>Other variable -transformation commands> Split string variables into partsDescriptionsplitsplits the contents of a string variable ,strvar, into one or more parts , using one or moreparsestrings(by default, blank spaces)
The key string functions for subdividing string variables and, indeed, strings in general, are strpos(), which finds the position of separators, and substr(), which extracts parts of the string. (See[D] functions.) split is based on the use of those functions.
Download split — Split string variables into parts
Information
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document: