blob: 7661acec64875dd9d59721682dcafd5d2efb71c1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
// SPDX-License-Identifier: BSD-2-Clause
// 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))
}
|