Processing, 類Client
中的readStringUntil()
用法介紹。
用法
client.readStringUntil(interesting)
參數
client
(Client)
客戶端類型的任何變量interesting
(int)
指定用於標記數據結束的字符
返回
String
說明
readBytesUntil()
和 readString()
的組合。如果找不到您要查找的內容,則返回 null
。
例子
// Creates a client that listens for input until it
// gets a linefeed character,and puts the bytes it gets
// into a byte[] buffer.
import processing.net.*;
Client myClient;
String inString;
byte interesting = 10;
void setup() {
size (300, 100);
// Connect to the local machine at port 10002.
// This example will not run if you haven't
// previously started a server on this port.
myClient = new Client(this, "127.0.0.1", 10002);
}
void draw() {
if (myClient.available() > 0) {
background(0);
inString = myClient.readStringUntil(interesting);
println(inString);
}
}
相關用法
- Processing Client.readString()用法及代碼示例
- Processing Client.readBytesUntil()用法及代碼示例
- Processing Client.read()用法及代碼示例
- Processing Client.readBytes()用法及代碼示例
- Processing Client.readChar()用法及代碼示例
- Processing Client.active()用法及代碼示例
- Processing Client.ip()用法及代碼示例
- Processing Client.write()用法及代碼示例
- Processing Client.clear()用法及代碼示例
- Processing Client.stop()用法及代碼示例
- Processing Client.available()用法及代碼示例
- Processing Client用法及代碼示例
- Processing Capture.stop()用法及代碼示例
- Processing Capture.start()用法及代碼示例
- Processing Capture.available()用法及代碼示例
- Processing Capture.read()用法及代碼示例
- Processing Capture用法及代碼示例
- Processing FFT用法及代碼示例
- Processing SawOsc.pan()用法及代碼示例
- Processing FloatDict用法及代碼示例
- Processing FFT.stop()用法及代碼示例
- Processing join()用法及代碼示例
- Processing () (parentheses)用法及代碼示例
- Processing Pulse用法及代碼示例
- Processing PShader用法及代碼示例
注:本文由純淨天空篩選整理自processing.org大神的英文原創作品 Client.readStringUntil()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。