Romain Vimont
feb250a973
Fix typos reported by codespell
4 years ago
Romain Vimont
b7e631791c
Add util function to remove trailing '\r'
...
Depending on the platform and adb versions, the lines output by adb
could end with "\r\r\n". This util function helps to remove all trailing
'\r'.
PR #2827 <https://github.com/Genymobile/scrcpy/pull/2827 >
4 years ago
Romain Vimont
b52f87a892
Add util function to locate a column in a string
...
This will help to parse the result of "adb shell ip route" to find the
device IP address.
PR #2827 <https://github.com/Genymobile/scrcpy/pull/2827 >
4 years ago
Romain Vimont
3653fb6b15
Add OutOfMemory log helper
...
Add a special LOG_OOM() function to log all OutOfMemory errors (i.e.
allocations returning NULL).
4 years ago
Romain Vimont
cb65531533
Simplify sc_str_truncate()
...
Use strcspn() to get the prefix length directly.
4 years ago
Romain Vimont
9619ade706
Generalize string trunctation util function
...
Add an additional argument to let the client pass the possible end
chars.
4 years ago
Romain Vimont
f2781a8b6d
Expose util function to truncate first line
...
Move the local implementation from adb functions to the string util
functions.
4 years ago
Romain Vimont
057c7a4df4
Move str_util to str
...
Simplify naming.
4 years ago