]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
main : update escape_double_quotes() function (#776)
authorTauseef Mohiuddin <redacted>
Sun, 23 Apr 2023 13:47:30 +0000 (08:47 -0500)
committerGitHub <redacted>
Sun, 23 Apr 2023 13:47:30 +0000 (16:47 +0300)
commiteecf2c3d4166ea03a73ea59125a984e533acce88
tree7ad6710224924a631e900861f1fb339761f91f0b
parentc23588cc4b2c4be4ba3634a21c7f2b302c5f370e
main : update escape_double_quotes() function (#776)

Updated the escape_double_quotes() function such that the function now escapes both double quotes and backslashes in the input string.

Changes Made:

- Renamed the function to escape_quotes_and_backslashes

- Modified the condition in the first loop to increment the value of 'escaped_length' for both double quotes and backslashes.

- Modified the condition in second loop to add a backslash before the current character if it is a double quote or a backslash.

Resolves: #769
examples/main/main.cpp