aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/string1.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/string1.go')
-rw-r--r--src/runtime/string1.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/runtime/string1.go b/src/runtime/string1.go
index 35cde43be0..feeb341b62 100644
--- a/src/runtime/string1.go
+++ b/src/runtime/string1.go
@@ -67,42 +67,3 @@ func gostringw(strw *uint16) string {
b[n2] = 0 // for luck
return s[:n2]
}
-
-func strcmp(s1, s2 *byte) int32 {
- p1 := (*[_MaxMem/2 - 1]byte)(unsafe.Pointer(s1))
- p2 := (*[_MaxMem/2 - 1]byte)(unsafe.Pointer(s2))
-
- for i := uintptr(0); ; i++ {
- c1 := p1[i]
- c2 := p2[i]
- if c1 < c2 {
- return -1
- }
- if c1 > c2 {
- return +1
- }
- if c1 == 0 {
- return 0
- }
- }
-}
-
-func strncmp(s1, s2 *byte, n uintptr) int32 {
- p1 := (*[_MaxMem/2 - 1]byte)(unsafe.Pointer(s1))
- p2 := (*[_MaxMem/2 - 1]byte)(unsafe.Pointer(s2))
-
- for i := uintptr(0); i < n; i++ {
- c1 := p1[i]
- c2 := p2[i]
- if c1 < c2 {
- return -1
- }
- if c1 > c2 {
- return +1
- }
- if c1 == 0 {
- break
- }
- }
- return 0
-}