File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
hardware/esp8266com/esp8266/cores/esp8266 Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -64,3 +64,17 @@ size_t IPAddress::printTo(Print& p) const {
64
64
return n;
65
65
}
66
66
67
+ char *IPAddress::toCharArray ()
68
+ {
69
+ static char szRet[20 ];
70
+ String str = String (_address.bytes [0 ]);
71
+ str += " ." ;
72
+ str += String (_address.bytes [1 ]);
73
+ str += " ." ;
74
+ str += String (_address.bytes [2 ]);
75
+ str += " ." ;
76
+ str += String (_address.bytes [3 ]);
77
+ str.toCharArray (szRet, 20 );
78
+ return szRet;
79
+ }
80
+
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ class IPAddress: public Printable {
70
70
IPAddress& operator =(uint32_t address);
71
71
72
72
virtual size_t printTo (Print& p) const ;
73
+ char * toCharArray ();
73
74
74
75
friend class EthernetClass ;
75
76
friend class UDP ;
You can’t perform that action at this time.
0 commit comments