本文整理了Java中akka.protobuf.ByteString.substring()
方法的一些代码示例,展示了ByteString.substring()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteString.substring()
方法的具体详情如下:
包路径:akka.protobuf.ByteString
类名称:ByteString
方法名:substring
[英]Return the substring from beginIndex, inclusive, to the end of the string.
[中]将子字符串从beginIndex(含)返回到字符串的末尾。
代码示例来源:origin: com.typesafe.akka/akka-protobuf_2.11
/**
* Return the substring from {@code beginIndex}, inclusive, to the end of the
* string.
*
* @param beginIndex start at this index
* @return substring sharing underlying data
* @throws IndexOutOfBoundsException if {@code beginIndex < 0} or
* {@code beginIndex > size()}.
*/
public ByteString substring(int beginIndex) {
return substring(beginIndex, size());
}
代码示例来源:origin: com.typesafe.akka/akka-protobuf
/**
* Return the substring from {@code beginIndex}, inclusive, to the end of the
* string.
*
* @param beginIndex start at this index
* @return substring sharing underlying data
* @throws IndexOutOfBoundsException if {@code beginIndex < 0} or
* {@code beginIndex > size()}.
*/
public ByteString substring(int beginIndex) {
return substring(beginIndex, size());
}
代码示例来源:origin: com.typesafe.akka/akka-protobuf_2.12
/**
* Return the substring from {@code beginIndex}, inclusive, to the end of the
* string.
*
* @param beginIndex start at this index
* @return substring sharing underlying data
* @throws IndexOutOfBoundsException if {@code beginIndex < 0} or
* {@code beginIndex > size()}.
*/
public ByteString substring(int beginIndex) {
return substring(beginIndex, size());
}
代码示例来源:origin: com.typesafe.akka/akka-protobuf_2.12
result = left.substring(beginIndex, endIndex);
} else if (beginIndex >= leftLength) {
.substring(beginIndex - leftLength, endIndex - leftLength);
} else {
ByteString leftSub = left.substring(beginIndex);
ByteString rightSub = right.substring(0, endIndex - leftLength);
代码示例来源:origin: com.typesafe.akka/akka-protobuf
result = left.substring(beginIndex, endIndex);
} else if (beginIndex >= leftLength) {
.substring(beginIndex - leftLength, endIndex - leftLength);
} else {
ByteString leftSub = left.substring(beginIndex);
ByteString rightSub = right.substring(0, endIndex - leftLength);
代码示例来源:origin: com.typesafe.akka/akka-protobuf_2.11
result = left.substring(beginIndex, endIndex);
} else if (beginIndex >= leftLength) {
.substring(beginIndex - leftLength, endIndex - leftLength);
} else {
ByteString leftSub = left.substring(beginIndex);
ByteString rightSub = right.substring(0, endIndex - leftLength);
代码示例来源:origin: com.typesafe.akka/akka-protobuf_2.12
/**
* Tests if this bytestring starts with the specified prefix.
* Similar to {@link String#startsWith(String)}
*
* @param prefix the prefix.
* @return <code>true</code> if the byte sequence represented by the
* argument is a prefix of the byte sequence represented by
* this string; <code>false</code> otherwise.
*/
public boolean startsWith(ByteString prefix) {
return size() >= prefix.size() &&
substring(0, prefix.size()).equals(prefix);
}
代码示例来源:origin: com.typesafe.akka/akka-protobuf
/**
* Tests if this bytestring starts with the specified prefix.
* Similar to {@link String#startsWith(String)}
*
* @param prefix the prefix.
* @return <code>true</code> if the byte sequence represented by the
* argument is a prefix of the byte sequence represented by
* this string; <code>false</code> otherwise.
*/
public boolean startsWith(ByteString prefix) {
return size() >= prefix.size() &&
substring(0, prefix.size()).equals(prefix);
}
代码示例来源:origin: com.typesafe.akka/akka-protobuf_2.11
/**
* Tests if this bytestring starts with the specified prefix.
* Similar to {@link String#startsWith(String)}
*
* @param prefix the prefix.
* @return <code>true</code> if the byte sequence represented by the
* argument is a prefix of the byte sequence represented by
* this string; <code>false</code> otherwise.
*/
public boolean startsWith(ByteString prefix) {
return size() >= prefix.size() &&
substring(0, prefix.size()).equals(prefix);
}
内容来源于网络,如有侵权,请联系作者删除!