0
if (cmd == "card_request") {

   Debug.Log("FOund cards");
   ISFSObject responseParams = (SFSObject)evt.Params["params"];
   Debug.Log(responseParams.GetClass("cards").ToString());
   SFSArray data = (SFSArray)responseParams.GetSFSArray("cards");
   Debug.Log(data.GetUtfString(0));

   //for (int i = 0; i < data.GetUtfString(0).IndexOf("value"); i++) {
     firstSplit = data.GetUtfString(0).Split(';');
     Debug.Log(firstSplit);
   //}
   for (int i = 0; i < firstSplit[0].IndexOf("value"); i++) {
     secondSplit = firstSplit[0].Split(':');
     Debug.Log(secondSplit);
   }
   for (int i = 0; i < secondSplit[0].IndexOf("value"); i++) {
     thirdSplit = secondSplit[0].Split(',');
     Debug.Log(thirdSplit);
   }
}

这条线的数据很好 Debug.Log(data.GetUtfString(0)); 但是当我尝试拆分它时会出现错误。有人可以建议我拆分UTF字符串的有效方法。空异常发生在 secondSplit 和 thirdSplit

4

0 回答 0