com.simiacryptus.util.Util.stripPrefix()方法的使用及代码示例

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

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

Util.stripPrefix介绍

[英]Strip prefix string.
[中]带前缀字符串。

代码示例

代码示例来源:origin: com.simiacryptus/literate-reporting

/**
 * Resolve resource file.
 *
 * @param name the name
 * @return the file
 */
@Nonnull
public File resolveResource(@Nonnull final CharSequence name) {
 return new File(getResourceDir(), Util.stripPrefix(name.toString(), "etc/"));
}

代码示例来源:origin: com.simiacryptus/java-util

/**
 * Resolve resource file.
 *
 * @param name the name
 * @return the file
 */
@Nonnull
public File resolveResource(@Nonnull final CharSequence name) {
 return new File(getResourceDir(), Util.stripPrefix(name.toString(), "etc/"));
}

代码示例来源:origin: com.simiacryptus/java-util

/**
 * Code file string.
 *
 * @param file the file
 * @return the string
 */
public CharSequence pathTo(@javax.annotation.Nonnull File file) {
 return stripPrefix(Util.toString(pathToFile(getReportFile(), file)), "/");
}

代码示例来源:origin: com.simiacryptus/literate-reporting

/**
 * Code file string.
 *
 * @param file the file
 * @return the string
 */
public CharSequence pathTo(@javax.annotation.Nonnull File file) {
 return stripPrefix(Util.toString(pathToFile(getReportFile(), file)), "/");
}

代码示例来源:origin: com.simiacryptus/java-util

@Override
public Response serve(final IHTTPSession session) {
 String requestPath = Util.stripPrefix(session.getUri(), "/");
 @javax.annotation.Nonnull final File file = new File(root, requestPath);
 if (session.getMethod() == Method.GET) {

代码示例来源:origin: com.simiacryptus/literate-reporting

@Override
public Response serve(final IHTTPSession session) {
 String requestPath = Util.stripPrefix(session.getUri(), "/");
 @javax.annotation.Nonnull final File file = new File(root, requestPath);
 if (session.getMethod() == Method.GET) {

相关文章