この方法についてサポートが必要です。
String d = ret.getData(); //I get the string using this
int ui;
ui = d.indexOf("=", d.indexOf("=")+1);
do{
int f=d.indexOf("=", ui+1 );
System.out.println(d.substring(ui+1, f-1));//Here I'm showing the results of my code
ui = ui + d.indexOf("=", ui);}
while ((d.indexOf("=") + ui)!= 0);
私が持っている文字列はこれです:
!re
=.id=*1
=name=ether1
=mtu=1500
=l2mtu=1600
=mac-address=D4:CA:6D:37:44:26
=arp=enabled
=auto-negotiation=true
=full-duplex=true
=speed=100Mbps
=running=true
=slave=false
=disabled=false
そして、私のコードの結果は次のとおりです。
*1
ether1
l2mt
24:22
nin
そして、私が取得したいのは:
*1
ether1
1500
1600
D4:CA:6D:37:44:26
enabled
true
true
100Mbps
true
false
false
「=」の後にあるものをすべて取得する必要があります
助けてください!ありがとう