| Group: | String Manipulation |
| See also: | atof string |
| Function: | substr | |
| Description: | substr extracts a substring from a string. |
| Usage: | z = string (str, from, to) | |
| Input: | ||
| str | n x 1 string vector | |
| from | n x 1 vector | |
| to | n x 1 vector | |
| Output: | ||
| z | n x 1 string vector | |
fmt = "Number : %10.3f" i = 1:10 str = string (fmt, i) str = substr (str, i, i+10) str
Contents of str [ 1,] "Number : " [ 2,] "umber : " [ 3,] "mber : " [ 4,] "ber : " [ 5,] "er : " [ 6,] "r : " [ 7,] " : 7" [ 8,] " : 8." [ 9,] ": 9.0" [10,] " 10.00"
| Group: | String Manipulation |
| See also: | atof string |