當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。