1 PublicPlugin_init ()2 {3 Newstr1[8], str2[8]4 5Copy (STR1,sizeof(STR1),"0123456789")6Format (STR2,sizeof(STR2),"0123456789")7 8Server_print ("copy sizeof: [%s]", str1)9Server_print ("format sizeof: [%s]", str2)Ten One A Newstr3[8], str4[8] - -Copy (STR3, Charsmax (STR3),"0123456789") theFormat (STR4, Charsmax (STR4),"0123456789") - -Server_print ("copy Charsmax: [%s]", STR3) -Server_print ("format Charsmax: [%s]", STR4) + - + Newstr5[9], str6[9] A atCopy (STR5,sizeof(STR5),"1234567") -Format (STR6,sizeof(STR6),"1234567") - -Server_print ("Chinese copy sizeof: [%s]", STR5) -Server_print ("Chinese format sizeof: [%s]", STR6) - in - Newstr7[9], str8[9] to +Copy (STR7, Charsmax (STR7),"1234567") -Format (STR8,sizeof(STR8),"1234567") the *Server_print ("Chinese copy charsmax: [%s]", STR5) $Server_print ("Chinese format charsmax: [%s]", STR6)Panax Notoginseng -}
Operation Result:
Copy command a bit of a bug, format is absolutely no problem, Sizeof/charsmax can be used, by the way in the pawn a full-width character occupies 3 bytes ...
sizeof and Charsmax