all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
12
Task/String-length/AppleScript/string-length-2.applescript
Normal file
12
Task/String-length/AppleScript/string-length-2.applescript
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
set inString to "Hello World" as Unicode text
|
||||
set byteCount to 0
|
||||
set idList to id of inString
|
||||
|
||||
repeat with incr in idList
|
||||
set byteCount to byteCount + 2
|
||||
if incr as integer > 65535 then
|
||||
set byteCount to byteCount + 2
|
||||
end if
|
||||
end repeat
|
||||
|
||||
byteCount
|
||||
Loading…
Add table
Add a link
Reference in a new issue