ENGR 122 Lecture Notes - Lecture 5: Eval, Delimiter, C String Handling
Document Summary
String variables: string variables can be created using assignment statements input funcion (with s" as the second argument, many built in funcions are designed to work with strings. String concatenaion: string concatenaion involves the joining of strings. [ string1" string2": will retain leading blanks strcat( string1","string2") verical concatenaion. Character matrices: both methods can be used to create a matrix in which every row contains a string. String funcions: funcions that deal with blank spaces. Blanks creates a string of all blank spaces. Deblank removes trailing blanks strtrim removes leading and trailing blanks there is no built in funcion to remove blanks in the middle of a string: funcion that convert case for leters. Upper converts a string to all uppercase leters lower converts a string to all lowercase leters. The sprint funcion: sprint is used to create a string. Works in the same way as fprint: can be used to create customized strings to pass to other funcions.