Summary Files Commits Branches @commit @diff @stats
path: root / src / StringConsumer / IWordConsumer.cl
blob: a809cd26dc55361883861a7c279bbc13394742f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
class IWordConsumer inherits IStringConsumer {
	word: String;

	consume(s: String) : Int {{
		consumed_length <- 0;
		if s.substr(0, word.length()) = word
		then
			consumed_length <- word.length()
		else
			consumed_length
		fi;
	}};
};