blob: 152378108ae3f7137de7df3900106f4c527d82ef [file] [log] [blame]
[module stdlib('http://www.eclipse.org/emf/2002/Ecore')/]
[template public test_stdlib(p : EPackage)]
[file ('test_string_substitute', false)]
[if ('test'.substitute('es', 'se') = 'tset')]constant output[/if]
[/file]
[file ('test_string_index', false)]
[if ('test'.index('es') = 2)]constant output[/if]
[/file]
[file ('test_string_first', false)]
[if ('test'.first(2) = 'te') and '1test'.first(1) = '1']constant output[/if]
[/file]
[file ('test_string_last', false)]
[if ('test'.last(3) = 'est')]constant output[/if]
[/file]
[file ('test_string_strstr', false)]
[if ('test'.strstr('es') and not 'test'.strstr('tests'))]constant output[/if]
[/file]
[file ('test_string_strtok', false)]
[if ('test'.strtok('e', 0) = 't' and 'test'.strtok('e', 1) = 'st')]constant output[/if]
[/file]
[file ('test_string_strcmp', false)]
[if ('test'.strcmp('est') > 0 and 'test'.strcmp('test') = 0 and 'est'.strcmp('test') < 0)]constant output[/if]
[/file]
[file ('test_string_isAlpha', false)]
[if ('test'.isAlpha() and not 'test1'.isAlpha())]constant output[/if]
[/file]
[file ('test_string_isAlphanum', false)]
[if ('test1'.isAlphanum())]constant output[/if]
[/file]
[file ('test_string_toUpperFirst', false)]
[if ('test1'.toUpperFirst() = 'Test1')]constant output[/if]
[/file]
[file ('test_string_toLowerFirst', false)]
[if ('TEST'.toLowerFirst() = 'tEST')]constant output[/if]
[/file]
[/template]