# set terminal svg size 600,400 dynamic enhanced fname 'arial' fsize 10 mousing name "stringvar_2" butt solid # set output 'stringvar.2.svg' set label 1 "Exercise string handling functions\n\nfoo = ABCDEF\nstrlen(foo) = 6\nsubstr(foo,3,4) = CD\n\nhaystack = `date`\nhaystack = Mon Apr 1 14:15:08 PDT 2013\nneedle = :\nS = strstrt(haystack,needle) = 14\nhaystack[S-2:S+2] = 14:15\nIt is now 14:15\n\nwords(haystack) = 6\nword(haystack,5) = PDT\n\nsprintf output of long strings works OK\n" at graph 0.1, 0.9, 0 left norotate back nopoint offset character 0, 0, 0 set style data lines set noxtics set noytics set yrange [ 0.00000 : 1.00000 ] noreverse nowriteback beg = 2 end = 4 foo = " 1 2 3 4 5 6" ERRNO = 0 haystack = "Mon Apr 1 14:15:08 PDT 2013" needle = ":" S = 14 plot 0