1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-12-21 03:10:06 +01:00

♻️ Use replacing(with:) instead of .replacingOccurrences(of:with:)

The newer Swift native method is broadly supported and can properly
handle complex UTF-8 characters like emoji, whereas the old API does
not work correctly with emoji.

In most cases, this likely wouldn't have caused any issues but it does
make things a little cleaner now, and ensures we won't encounter emoji
trouble in the future.
This commit is contained in:
2025-11-11 12:55:23 +01:00
parent ae26c74029
commit 38b3c108bf
27 changed files with 60 additions and 56 deletions

View File

@@ -118,7 +118,7 @@ struct RealFileSystemTest {
#expect(filesystem.fileExists(executable))
let newExecutable = executable.replacingOccurrences(of: "/exec.sh", with: "/file.txt")
let newExecutable = executable.replacing("/exec.sh", with: "/file.txt")
try! filesystem.move(from: executable, to: newExecutable)