https://github.com/iseki0/strings
strings implementation in Java.
https://github.com/iseki0/strings
binutils strings
Last synced: about 1 year ago
JSON representation
strings implementation in Java.
- Host: GitHub
- URL: https://github.com/iseki0/strings
- Owner: iseki0
- License: apache-2.0
- Created: 2023-07-27T13:16:02.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-01-25T03:57:23.000Z (over 1 year ago)
- Last Synced: 2025-02-07T04:41:31.063Z (over 1 year ago)
- Topics: binutils, strings
- Language: Java
- Homepage:
- Size: 225 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# strings
`strings` implementation in Java.
```kotlin
import java.nio.file.Path
import java.security.MessageDigest
import java.util.HexFormat
import kotlin.io.path.inputStream
Path.of("/theFile").inputStream().buffered().use { input ->
for (bytes in Strings.createByteArrayIterator(input)) {
println(bytes.toString(Charsets.US_ASCII))
}
}
Path.of("/theFile").inputStream().buffered().use { input ->
for (hash in Strings.createHashIterator(MessageDigest.getInstance("MD5"), input)) {
println(HexFormat.of().formatHex(hash)) // print MD5 for every string
}
}
```