Skip to content

Commit 828bfec

Browse files
authored
Merge pull request #65138 from apple/egorzhdan/std-string-centos
[cxx-interop] Fix CxxStdlib build error on CentOS
2 parents ed6fcdd + 7774650 commit 828bfec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/Cxx/std/String.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extension std.string {
3333
return
3434
}
3535

36-
let len = strlen(str)
36+
let len = UTF8._nullCodeUnitOffset(in: str)
3737
for i in 0..<len {
3838
let char = UInt8(str[i])
3939
self.push_back(value_type(bitPattern: char))

0 commit comments

Comments
 (0)