Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.52 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.   "fmt"
  5.   "testing"
  6. )
  7.  
  8.  
  9. func main() {
  10.     str := "\x48\x65\x6C\x6C\x6F\x20\x3A\x2D\x29"
  11.   ASCII := "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" +
  12.     "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" +
  13.     ` !"#$%&'()*+,-./0123456789:;<=>?` +
  14.     `@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` +
  15.     "`abcdefghijklmnopqrstuvwxyz{|}~\x7f"
  16.  
  17.     fmt.Println(str)
  18.  
  19.   for i :=0; i < len(str); i++
  20.   for j :=0; i < len(ASCII); j++ {
  21.     if str [i] != ASCII [j] {
  22.       fatal()
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement