Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String abc = "?ip=172.75.1.99&";
- //-------------------------------------------------------
- void setup() {
- Serial.begin(115200);
- int posicao;
- String temp = abc;
- int num[4] ;
- posicao = temp.indexOf(".");
- num[0] = temp.substring(4, posicao).toInt();
- temp = temp.substring(posicao + 1, 20 );
- for (int i = 1; i < 4; i++)
- {
- posicao = temp.indexOf(".");
- num[i] = temp.substring(0, posicao).toInt();
- temp = temp.substring(posicao + 1, 20 );
- }
- for (int i = 0; i < 4; i++)
- {
- Serial.println(num[i] );
- }
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement