Official web site : http://www.scolring.org/.
Plateform : Windows XP or +, GNU / Linux with glib > 2.x
Scol : 4.0 or +
Some new functions to add to the current standard library
No specific way.
strextrS is a similar function at strextr. Instead of " " as separator, you can take any string at your convenience.
| Return | Type | Name | Description |
|---|---|---|---|
| fun [S S] [[S r1] r1] | |||
| - | S | string | any string to cut |
| - | S | pattern | any string |
| [[S r1] r1] | - | - | list of lines, each line is a list of customized words or nil if error or nil if error |
typeof listStrextrS = [[S r1] r1];; fun main ()= _showconsole; set listStrextrS = strextrS "The SO3Engine is the new 3d engine of Scol.\nIt is better than the old." "e"; ...
listextr extract a sublist from a list, between two indices
| Return | Type | Name | Description |
|---|---|---|---|
| fun [[u0 r1] I I] [u0 r1] | |||
| - | [u0 r1] | list | any list to extract |
| - | I | first | the first indice (if the value is negative, the position is since the end) |
| - | I | last | the last indice (if the value is negative, the position is since the end) |
| [u0 r1] | - | - | a new list or nil if error |
fun main ()= _showconsole; _fooIList listextr 0::1::2::3::4::5::6::7::nil (-5) 4; _fooSList listextr "0"::"1"::"2"::"3"::"4"::"5"::"6"::"7"::nil 2 4; ...
strfind2List is a similar function at strfind. But return the positions of all substring found
| Return | Type | Name | Description |
|---|---|---|---|
| fun [S S I] [I r1] | |||
| - | S | string | any string |
| - | S | substring | any substring |
| - | I | init_position | position to start |
| [I r1] | - | - | list of the all positions or nil if error |
fun main ()= _showconsole; _fooIList strfind2List "Scol is a good language." "a" 0; _fooIList strfind2List "Scol is a good language." "good" 12; ...