2
我想实现这样的事情:用字符串分割字节数组?
String sentence = "Hi there over there";
String[]result = sentence.split("there");
//you get result[0] = Hi, result[1] = over
是否有可能使用String中的字节数组形式分裂?
byte[]delimiter = "there".getBytes();
byte[]byteSentence = sentence.getBytes();
//then somehow split byteSentence using delimiter.
这是我会怎么做 – Bohemian
同意 - 我认为这是最可读的解决方案。 –