However, if you absolutely must be able to convert other data types to a boolean, you can make use of
the Std.bool() function as described later in this chapter.
Strings
Strings are a useful data type, especially in web - based applications where much of the data transmitted
from server to client is in a textual format. The String type in haXe can represent textual values of any
size, though it can prove more efficient to include very large textual strings via an external text file or by
using the StringBuf (string buffer) class.
String literals are represented as characters surrounded by double or single quotes. Both have the same
result, so it is up to you which type of quote you choose to adopt. When you build your string content, it
is possible to add invisible characters such as tabs and newlines. These are called escaped characters and
are supplied by using the backward slash ( \ ) followed by a letter, as shown in Table 3 - 1 . For example,
Part I: The Core Language
34
when typing columned lists, you could be tempted to separate your columns by entering, say, four space
characters between each column, like this:
var myList:String = ???id qty name???;
This would be fine for a single line of text, but when you enter subsequent lines and supply four space
characters between each column, your results might end up looking something like this:
id qty name
1 22 Whizz Crackers
2 1 Snozz Bangers
.
Pages:
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101