Jump to content

Empty string: Difference between revisions

Added Delphi example
(Add Seed7 example)
(Added Delphi example)
Line 81:
return s is "";
}</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}}==
Line 98 ⟶ 120:
-- string is not empty
end if</lang>
 
=={{header|Go}}==
Go has no special syntax for empty strings
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.