var str :String = "abcdefg"; var num:int = str .charCodeAt(i);就这么一行,就可以了。 任何一个数字的^异或操作,然后再进行一次异或,那么就等于原来的数字