Elektrine lite

← Feed

@marchyman@sfba.social

Post #2329194

2026-04-18 04:07 UTC

#SwiftLang odditity. When can't you trust string count? When you need to add a \r for reasons let string1 = “12345\r” let string2 = “12345\r\n” string1.count == string2.count Both are of size 6 which is not helpful when trying to build a network packet and need to count ALL the bytes. Grumble. I kind of remember this from way back when.

Replies (1)