okhttp3.internal.Util.trimSubstring()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(167)

本文整理了Java中okhttp3.internal.Util.trimSubstring()方法的一些代码示例,展示了Util.trimSubstring()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.trimSubstring()方法的具体详情如下:
包路径:okhttp3.internal.Util
类名称:Util
方法名:trimSubstring

Util.trimSubstring介绍

[英]Equivalent to string.substring(pos, limit).trim().
[中]

代码示例

代码示例来源:origin: square/okhttp

pairEnd = delimiterOffset(header, pos, limit, ";,");
int equalsSign = delimiterOffset(header, pos, pairEnd, '=');
String name = trimSubstring(header, pos, equalsSign);
if (name.startsWith("$")) continue;
  ? trimSubstring(header, equalsSign + 1, pairEnd)
  : "";

代码示例来源:origin: square/okhttp

if (pairEqualsSign == cookiePairEnd) return null;
String cookieName = trimSubstring(setCookie, pos, pairEqualsSign);
if (cookieName.isEmpty() || indexOfControlOrNonAscii(cookieName) != -1) return null;
String cookieValue = trimSubstring(setCookie, pairEqualsSign + 1, cookiePairEnd);
if (indexOfControlOrNonAscii(cookieValue) != -1) return null;
 String attributeName = trimSubstring(setCookie, pos, attributeEqualsSign);
 String attributeValue = attributeEqualsSign < attributePairEnd
   ? trimSubstring(setCookie, attributeEqualsSign + 1, attributePairEnd)
   : "";

代码示例来源:origin: com.squareup.okhttp3/okhttp

if (pairEqualsSign == cookiePairEnd) return null;
String cookieName = trimSubstring(setCookie, pos, pairEqualsSign);
if (cookieName.isEmpty() || indexOfControlOrNonAscii(cookieName) != -1) return null;
String cookieValue = trimSubstring(setCookie, pairEqualsSign + 1, cookiePairEnd);
if (indexOfControlOrNonAscii(cookieValue) != -1) return null;
 String attributeName = trimSubstring(setCookie, pos, attributeEqualsSign);
 String attributeValue = attributeEqualsSign < attributePairEnd
   ? trimSubstring(setCookie, attributeEqualsSign + 1, attributePairEnd)
   : "";

代码示例来源:origin: com.squareup.okhttp3/okhttp-urlconnection

pairEnd = delimiterOffset(header, pos, limit, ";,");
int equalsSign = delimiterOffset(header, pos, pairEnd, '=');
String name = trimSubstring(header, pos, equalsSign);
if (name.startsWith("$")) continue;
  ? trimSubstring(header, equalsSign + 1, pairEnd)
  : "";

代码示例来源:origin: com.github.ljun20160606/okhttp-urlconnection

pairEnd = delimiterOffset(header, pos, limit, ";,");
int equalsSign = delimiterOffset(header, pos, pairEnd, '=');
String name = trimSubstring(header, pos, equalsSign);
if (name.startsWith("$")) continue;
  ? trimSubstring(header, equalsSign + 1, pairEnd)
  : "";

代码示例来源:origin: apache/servicemix-bundles

pairEnd = delimiterOffset(header, pos, limit, ";,");
int equalsSign = delimiterOffset(header, pos, pairEnd, '=');
String name = trimSubstring(header, pos, equalsSign);
if (name.startsWith("$")) continue;
  ? trimSubstring(header, equalsSign + 1, pairEnd)
  : "";

代码示例来源:origin: duzechao/OKHttpUtils

if (pairEqualsSign == cookiePairEnd) return null;
String cookieName = trimSubstring(setCookie, pos, pairEqualsSign);
if (cookieName.isEmpty()) return null;
String cookieValue = trimSubstring(setCookie, pairEqualsSign + 1, cookiePairEnd);
 String attributeName = trimSubstring(setCookie, pos, attributeEqualsSign);
 String attributeValue = attributeEqualsSign < attributePairEnd
   ? trimSubstring(setCookie, attributeEqualsSign + 1, attributePairEnd)
   : "";

代码示例来源:origin: com.github.ljun20160606/okhttp

if (pairEqualsSign == cookiePairEnd) return null;
String cookieName = trimSubstring(setCookie, pos, pairEqualsSign);
if (cookieName.isEmpty() || indexOfControlOrNonAscii(cookieName) != -1) return null;
String cookieValue = trimSubstring(setCookie, pairEqualsSign + 1, cookiePairEnd);
if (indexOfControlOrNonAscii(cookieValue) != -1) return null;
 String attributeName = trimSubstring(setCookie, pos, attributeEqualsSign);
 String attributeValue = attributeEqualsSign < attributePairEnd
   ? trimSubstring(setCookie, attributeEqualsSign + 1, attributePairEnd)
   : "";

代码示例来源:origin: apache/servicemix-bundles

if (pairEqualsSign == cookiePairEnd) return null;
String cookieName = trimSubstring(setCookie, pos, pairEqualsSign);
if (cookieName.isEmpty() || indexOfControlOrNonAscii(cookieName) != -1) return null;
String cookieValue = trimSubstring(setCookie, pairEqualsSign + 1, cookiePairEnd);
if (indexOfControlOrNonAscii(cookieValue) != -1) return null;
 String attributeName = trimSubstring(setCookie, pos, attributeEqualsSign);
 String attributeValue = attributeEqualsSign < attributePairEnd
   ? trimSubstring(setCookie, attributeEqualsSign + 1, attributePairEnd)
   : "";

相关文章