RosettaCodeData/Task/Empty-string/AppleScript/empty-string.applescript

31 lines
443 B
AppleScript

-- assign empty string to str
set str to ""
-- check if string is empty
if str is "" then
-- str is empty
end if
-- or
if id of str is {} then
-- str is empty
end if
-- or
if (count of str) is 0 then
-- str is empty
end if
-- check if string is not empty
if str is not "" then
-- string is not empty
end if
-- or
if id of str is not {} then
-- str is not empty
end if
-- or
if (count of str) is not 0 then
-- str is not empty
end if