如何使用client.read()读取两个字符之间的字符串?

时间:2016-09-27 02:54:48

标签: wifi esp8266 arduino-esp8266

在我的ESP8266 WiFi项目中,我通过GET请求从网站获取角色。目前的代码是:

while(client.available()){
    String line = client.readStringUntil('\r');
    Serial.print(line);
}

要获取特定字符之间的字符串,我该如何编辑?

1 个答案:

答案 0 :(得分:1)

在读取字符串操作后放置代码片段并将以下分隔符分隔符更改为您的, gatherStr 将是您想要的字符串:

class TracingMixing(object):
    """The callbacks in the FUSE Filesystem are C threads and breakpoints don't work normally.
       This mixin adds callbacks to every function call so that we can breakpoint them."""

    def __call__(self, op, path, *args):
        pydevd.settrace(suspend=False, trace_only_current_thread=True, patch_multiprocessing=True)
        return getattr(self, op)(path, *args)