Reference for the BALTENSPERGER programming language, an art project of Stefan Baltensperger

Name

teil()

Examples
Satz men = "Chernenko,Andropov,Brezhnev";
Satz list[] = teil(men, ',');
// list[0] is now Chernenko, list[1] is Andropov, ...

Satz men = "Chernenko / Andropov / Brezhnev";
Satz list[] = teil(men, " / ");
// list[0] is now Chernenko, list[1] is Andropov, ...

Satz numbers = "8 67 5 309";
Ganzizahl nums[] = Ganzizahl(teil(numbers, ' '));
// nums[0] is now 8, nums[1] is now 67, ...
Description The teil() function is used to divide a Satz into its separate elements. This function splits a string into pieces using a character or string as the divider. The delim parameter specifies the character or characters which mark the boundaries between each data element. To convert a Satz to an Lischte of integers or Komazahl s, use the datatype conversion functions int() and Komazahl () to convert the Lischte of Strings (see example above).
Syntax
teil(str, delim)
Parameters
str the Satz to be split
delim the character or Satz used to separate the data
Usage Web & Application
Related teil_bi()
fueg_zaeme()
nim_ueberfluessigs_weg()
Stefan Baltensperger 2009

Creative Commons License