Wafl Home

Primitive Data Types Tutorial

Functions strSplit and strJoin

Function strSplit(s,p) : (String * String -> List[String]) returns the list of all sub strings of the string s which are delimited by sub strings p. Function strJoin(l,p) : (List[String] * String -> String) concatenates elements of the list l. The delimiter p is inserted between list elements.

Source code:

{#
strSplit( 'a,bb,c,dd,e', ','),
strJoin( strSplit( 'a,bb,c,dd,e', ','), ';' )
#}

Result:

{# ["a","bb","c","dd","e"], "a;bb;c;dd;e" #}

 

Table of Contents

Let's Start

Program Structure

Primitive Data Types

List

Tuple

Record

HTML

Command Line Interpreter

Using Web Servers

Syntax

Examples

Tips

The most of examples evaluates with both command line and Web server Wafl interpreters. If any example is based on specific features of an interpreter, it is explicitly annotated.