[Next] [Prev] [_____] [Left] [Up] [Index] [Root]
Strings

Strings

A string is a collection of characters such as r$urt&* or fizzz3zzz . To give a string as input to Magma you must enclose it in " marks. For example:

> s := "g89ek4";

Given strings s and t, #s is the number of characters in s, and s*t or s cat t is s and t joined together (concatenated). If s lt t then s comes before t alphabetically. Position(s, t) returns the index of the first position at which t is a substring of s.

The newline, tab, backslash and " characters are \n, \t, \\ and \" respectively.

[Next] [Prev] [_____] [Left] [Up] [Index] [Root]