apple / swift-foundation

The Foundation project
Apache License 2.0
2.29k stars 135 forks source link

Add compatibility path for String(bytes:encoding:) #651

Closed parkera closed 1 month ago

parkera commented 1 month ago

Add a compatibility path for String(bytes:encoding:). Some clients expected this to correctly handle null-terminated strings. This patch falls back on NSString's behavior of producing a string with embedded nulls in some cases.

parkera commented 1 month ago

@swift-ci test