# set terminal pngcairo  transparent enhanced font "arial,10" fontscale 1.0 size 600, 400 
# set output 'stringvar.2.png'
unset border
set label 1 "Exercise string handling functions" at graph 0.1, 0.95, 0 left norotate back nopoint
set label 2 "" at graph 0.1, 0.9, 0 left norotate back nopoint
set label 3 "foo          =  ABCDEF" at graph 0.1, 0.85, 0 left norotate back nopoint
set label 4 "strlen(foo)  =  6" at graph 0.1, 0.8, 0 left norotate back nopoint
set label 5 "substr(foo,3,4) =  CD" at graph 0.1, 0.75, 0 left norotate back nopoint
set label 6 "" at graph 0.1, 0.7, 0 left norotate back nopoint
set label 7 "haystack     = `date`" at graph 0.1, 0.65, 0 left norotate back nopoint
set label 8 "haystack     =  22:47 20 December 2024" at graph 0.1, 0.6, 0 left norotate back nopoint
set label 9 "needle       =  :" at graph 0.1, 0.55, 0 left norotate back nopoint
set label 10 "S = strstrt(haystack,needle) =  3" at graph 0.1, 0.5, 0 left norotate back nopoint
set label 11 "haystack[S-2:S+2] =  22:47" at graph 0.1, 0.45, 0 left norotate back nopoint
set label 12 "It is now 22:47" at graph 0.1, 0.4, 0 left norotate back nopoint
set label 13 "" at graph 0.1, 0.35, 0 left norotate back nopoint
set label 14 "sprintf output of long strings works OK" at graph 0.1, 0.3, 0 left norotate back nopoint
set label 15 "" at graph 0.1, 0.25, 0 left norotate back nopoint
set style data lines
unset xtics
unset ytics
set trange [ * : * ] noreverse nowriteback
set urange [ * : * ] noreverse nowriteback
set vrange [ * : * ] noreverse nowriteback
set xrange [ * : * ] noreverse writeback
set x2range [ * : * ] noreverse writeback
set yrange [ 0.00000 : 1.00000 ] noreverse nowriteback
set y2range [ * : * ] noreverse writeback
set zrange [ * : * ] noreverse writeback
set cbrange [ * : * ] noreverse writeback
set rrange [ * : * ] noreverse writeback
set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front  noinvert bdefault
NO_ANIMATION = 1
iswindows = 0
isos2 = 0
beg = 2
end = 4
foo = "                                       1                                        2                                        3                                        4                                        5                                        6"
haystack = "22:47 20 December 2024"
needle = ":"
S = 3
plot 0 lc bgnd notitle