#Colon = 58
#DQ = 34
*ptr=Ascii(~"\"AUID\":\"523552525\",\"NAME\":\"Smith, Jack\",\"AGE\":\"38\"")
*ptr = MemFind(*ptr,#Colon) ; The pointer will now point to the first ":"
*ptr = MemFind(*ptr,#Colon) ; The pointer will now point to the second ":"
*ptr = MemFind(*ptr,#DQ) ; The pointer will now point to the quote before Smith
#Colon = 58
#DQ = 34
string$ = ~"\"AUID\":\"523552525\",\"NAME\":\"Smith, Jack\",\"AGE\":\"38\""
Debug string$
*p = Ascii(string$)
Procedure MemFind(*a.Ascii, n)
If *a = 0 Or *a\a = 0 Or n = 0
ProcedureReturn 0
EndIf
Repeat
If *a\a = n
ProcedureReturn *a
EndIf
*a + SizeOf(Ascii)
Until Not *a\a
ProcedureReturn 0
EndProcedure
*pStart = *p
Debug *p
*p = MemFind(*p, #Colon) ; The pointer will now point to the first ":"
Debug *p - *pStart
*p = MemFind(*p + 1, #Colon) ; The pointer will now point to the second ":"
Debug *p - *pStart
*p = MemFind(*p, #DQ) ; The pointer will now point to the quote before Smith
Debug *p - *pStart
#Colon = 58
#DQ = 34
Procedure MemFind(*AsciiBuffer.ascii, AsciiValue.a)
If *AsciiBuffer = 0 Or AsciiValue = 0 : ProcedureReturn : EndIf
Static *PreviousBuffer, PreviousValue.a
ShowMemoryViewer(*AsciiBuffer, 60)
If *AsciiBuffer = *PreviousBuffer And AsciiValue = PreviousValue
*AsciiBuffer+1
Else
*PreviousBuffer = *AsciiBuffer
PreviousValue = AsciiValue
EndIf
While *AsciiBuffer\a <> 0
If *AsciiBuffer\a = AsciiValue
*PreviousBuffer = *AsciiBuffer
Break
EndIf
*AsciiBuffer+1
Wend
ProcedureReturn *PreviousBuffer
EndProcedure
*ptr = Ascii(~"\"AUID\"):\"523552525\",\"NAME\":\"Smith, Jack\",\"AGE\":\"38\"")
*ptr = MemFind(*ptr,#Colon) ; The pointer will now point to the first ":"
*ptr = MemFind(*ptr,#Colon) ; The pointer will now point to the second ":"
*ptr = MemFind(*ptr,#DQ) ; The pointer will now point to the quote before Smith
*ptr = MemFind(*ptr,#Colon) ; The pointer will now point to the third ":"
*ptr = MemFind(*ptr,#DQ) ; The pointer will now point to the quote before 38
*ptr = MemFind(*ptr,#DQ) ; The pointer will now point to the last quote, last char
*ptr = MemFind(*ptr,#DQ) ; The pointer remains pointed to the last quote, last char