mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 19:35:27 +00:00
* use parsed options while signing * update project layout to v3 * fix .gitignore * remove example template * misc updates * bump tlsx version * hide template sig warning with env * js: retain value while using log * fix nil pointer derefernce * misc doc update --------- Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
18 lines
342 B
Go
18 lines
342 B
Go
package deserialization
|
|
|
|
import "bytes"
|
|
|
|
func InsertInto(s string, interval int, sep rune) string {
|
|
var buffer bytes.Buffer
|
|
before := interval - 1
|
|
last := len(s) - 1
|
|
for i, char := range s {
|
|
buffer.WriteRune(char)
|
|
if i%interval == before && i != last {
|
|
buffer.WriteRune(sep)
|
|
}
|
|
}
|
|
buffer.WriteRune(sep)
|
|
return buffer.String()
|
|
}
|