当前位置: 首页>>代码示例>>Java>>正文


Java StringUtils.stripStart方法代码示例

本文整理汇总了Java中org.apache.commons.lang.StringUtils.stripStart方法的典型用法代码示例。如果您正苦于以下问题:Java StringUtils.stripStart方法的具体用法?Java StringUtils.stripStart怎么用?Java StringUtils.stripStart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.lang.StringUtils的用法示例。


在下文中一共展示了StringUtils.stripStart方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: valStr

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
@Override
public String valStr() {
    String toTrim = args.get(0).valStr();
    if (nullValue = args.get(0).isNullValue())
        return null;
    String remove = null;
    if (getArgCount() == 2) {
        remove = args.get(1).valStr();
        if (nullValue = args.get(1).isNullValue())
            return null;
    }
    String ret = null;
    if (mTrimLeading)
        ret = StringUtils.stripStart(toTrim, remove);
    if (mTrimTrailing)
        ret = StringUtils.stripEnd(toTrim, remove);
    return ret;
}
 
开发者ID:actiontech,项目名称:dble,代码行数:19,代码来源:ItemFuncTrim.java

示例2: stripXmlDeclaration

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
private String stripXmlDeclaration(CharSequence sequence) {
    String str = sequence.toString();
    if (hasXmlDeclaration(str)) {
        str = str.substring(str.indexOf("?>") + 2);
        str = StringUtils.stripStart(str, null);
    }
    return str;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:XmlTransformer.java

示例3: testSendModeratedEmail

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
/**
 * Test that the mail action is correctly constructed when sending notifications emails about users requesting access to a specific site
 * @throws Exception
 */
public void testSendModeratedEmail() throws Exception
{                  
    Map<String, String> properties = buildDefaultProperties();
    inviteModeratedSender.sendMail(ENTERPRISE_EMAIL_TEMPLATE_PATH, SendModeratedInviteDelegate.EMAIL_SUBJECT_KEY, properties);

    verify(mailAction).setParameterValue(eq(MailActionExecuter.PARAM_FROM), eq(requesterMail));
    verify(mailAction).setParameterValue(eq(MailActionExecuter.PARAM_TO_MANY), eq(SiteManagerGroup));
    verify(mailAction).setParameterValue(eq(MailActionExecuter.PARAM_SUBJECT), eq(SendModeratedInviteDelegate.EMAIL_SUBJECT_KEY));
    verify(mailAction).setParameterValue(eq(MailActionExecuter.PARAM_SUBJECT_PARAMS), eq(new Object[]{fullSiteName}));
    verify(mailAction).setParameterValue(eq(MailActionExecuter.PARAM_TEMPLATE), eq(emailTemplateNodeRef));

    ArgumentCaptor<Map> modelC = ArgumentCaptor.forClass(Map.class);
    verify(mailAction).setParameterValue(eq(MailActionExecuter.PARAM_TEMPLATE_MODEL), (Serializable)modelC.capture());

    String pendingInvitesLink = StringUtils.stripStart(MessageFormat.format(InviteModeratedSender.SHARE_PENDING_INVITES_LINK, StringUtils.EMPTY, shortSiteName), "/");
    
    // Check the model
    Map model = modelC.getValue();
    assertNotNull(model);
    assertEquals(false, model.isEmpty());
    assertNotNull(model.get("productName"));
    assertEquals(model.get("inviteeName"), requesterFirstName + " " + requesterLastName);
    assertEquals(model.get("siteName"), fullSiteName);
    assertEquals(model.get("sharePendingInvitesLink"), pendingInvitesLink);
 
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:32,代码来源:InviteModeratedSenderTest.java

示例4: getBySignature

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
public Collection<? extends PhpNamedElement> getBySignature(String expression, Set<String> visited, int depth, Project project) {
    if(expression.startsWith("#K#C")) {
        // PhpStorm9: #K#C\Class\Foo.class
        if(expression.endsWith(".class")) {
            expression = StringUtils.stripStart(expression.substring(4, expression.length() - 6), "\\");
        }
    }

    return PhpIndex.getInstance(project).getClassesByFQN(expression);
}
 
开发者ID:cedricziel,项目名称:idea-php-typo3-plugin,代码行数:11,代码来源:ObjectManagerTypeProvider.java

示例5: getHdfsNodePath

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
public static String getHdfsNodePath(String parentNodePath, String nodeName) {
  return (StringUtils.stripEnd(parentNodePath, HDFS_PATH_SEPARATOR) +
      HDFS_PATH_SEPARATOR +
      StringUtils.stripStart(nodeName, HDFS_PATH_SEPARATOR));
}
 
开发者ID:Microsoft,项目名称:pai,代码行数:6,代码来源:HadoopUtils.java

示例6: getNodePath

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
public static String getNodePath(String parentNodePath, String nodeName) {
  return (StringUtils.stripEnd(parentNodePath, PATH_SEPARATOR) +
      PATH_SEPARATOR +
      StringUtils.stripStart(nodeName, PATH_SEPARATOR));
}
 
开发者ID:Microsoft,项目名称:pai,代码行数:6,代码来源:ZookeeperStoreStructure.java

示例7: authorize

import org.apache.commons.lang.StringUtils; //导入方法依赖的package包/类
public void authorize(String resource, String operation, String regionName, String key) {
  regionName = StringUtils.stripStart(regionName, "/");
  authorize(new ResourcePermission(resource, operation, regionName, key));
}
 
开发者ID:ampool,项目名称:monarch,代码行数:5,代码来源:IntegratedSecurityService.java


注:本文中的org.apache.commons.lang.StringUtils.stripStart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。