blob: a7c99ed0a1ea742be4861a117f031c73c49826a9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
// SPDX-License-Identifier: AGPL-3.0-only
// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>
package main
import "unsafe"
func stringToBytes(s string) (bytes []byte) {
return unsafe.Slice(unsafe.StringData(s), len(s))
}
|