# set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 # set output 'stringvar.2.png' set label 1 "Exercise string handling functions\n\nfoo = ABCDEF\nstrlen(foo) = 6\nsubstr(foo,3,4) = CD\n\nhaystack = `date`\nhaystack = Sun Feb 12 19:55:42 PST 2012\nneedle = :\nS = strstrt(haystack,needle) = 14\nhaystack[S-2:S+2] = 19:55\nIt is now 19:55\n\nwords(haystack) = 6\nword(haystack,5) = PST\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 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 = "Sun Feb 12 19:55:42 PST 2012" needle = ":" S = 14 plot 0