Empty string: Difference between revisions
Content added Content deleted
(Add Seed7 example) |
(Added Delphi example) |
||
Line 81: | Line 81: | ||
return s is ""; |
return s is ""; |
||
}</lang> |
}</lang> |
||
=={{header|Delphi}}== |
|||
<lang Delphi>program EmptyString; |
|||
{$APPTYPE CONSOLE} |
|||
uses SysUtils; |
|||
function StringIsEmpty(const aString: string): Boolean; |
|||
begin |
|||
Result := aString = ''; |
|||
end; |
|||
var |
|||
s: string; |
|||
begin |
|||
s := ''; |
|||
Writeln(StringIsEmpty(s)); // True |
|||
s := 'abc'; |
|||
Writeln(StringIsEmpty(s)); // False |
|||
end.</lang> |
|||
=={{header|Euphoria}}== |
=={{header|Euphoria}}== |
||
Line 98: | Line 120: | ||
-- string is not empty |
-- string is not empty |
||
end if</lang> |
end if</lang> |
||
=={{header|Go}}== |
=={{header|Go}}== |
||
Go has no special syntax for empty strings |
Go has no special syntax for empty strings |