You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hampi...@googlegroups.com
Hi all-
I just committed an update to Hampi that allows the definition and use
of sub-strings.
Here are a couple of examples of how to use the new operation:
var v:5;
val vSub := v[2:3]; //substring of v (offset 2, length 3)
assert v contains "fred";
assert vSub contains "de";
//expected result "frede"
var v:5;
val prefix := v[0:3];
val suffix := v[2:3];
reg r1 := star(['a'-'b']);
reg r2 := star("b");
assert prefix in r1;
assert suffix in r2;
//expected result "aabbb"