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


Java StringUtils.deleteWhitespace方法代码示例

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


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

示例1: renderHead

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
	super.renderHead(response);
	response.render(JavaScriptHeaderItem.forReference(new MarkdownResourceReference()));
	
	String encodedAttachmentSupport;
	if (getAttachmentSupport() != null) {
		encodedAttachmentSupport = Base64.encodeBase64String(SerializationUtils.serialize(getAttachmentSupport()));
		encodedAttachmentSupport = StringUtils.deleteWhitespace(encodedAttachmentSupport);
		encodedAttachmentSupport = StringEscapeUtils.escapeEcmaScript(encodedAttachmentSupport);
		encodedAttachmentSupport = "'" + encodedAttachmentSupport + "'";
	} else {
		encodedAttachmentSupport = "undefined";
	}
	String callback = ajaxBehavior.getCallbackFunction(explicit("action"), explicit("param1"), explicit("param2"), 
			explicit("param3")).toString();
	
	String autosaveKey = getAutosaveKey();
	if (autosaveKey != null)
		autosaveKey = "'" + JavaScriptEscape.escapeJavaScript(autosaveKey) + "'";
	else
		autosaveKey = "undefined";
	
	String script = String.format("gitplex.server.markdown.onDomReady('%s', %s, %d, %s, %d, %b, %b, %s);", 
			container.getMarkupId(), 
			callback, 
			ATWHO_LIMIT, 
			encodedAttachmentSupport, 
			getAttachmentSupport()!=null?getAttachmentSupport().getAttachmentMaxSize():0,
			getUserMentionSupport() != null,
			getPullRequestReferenceSupport() != null, 
			autosaveKey);
	response.render(OnDomReadyHeaderItem.forScript(script));
	
	script = String.format("gitplex.server.markdown.onWindowLoad('%s');", container.getMarkupId());
	response.render(OnLoadHeaderItem.forScript(script));
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:38,代码来源:MarkdownEditor.java

示例2: getExecCommandForHeapDump

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
/**
 * Generate parameters for JVM Heap dump
 *
 * @param scriptName
 * @param jvm
 * @return
 */
private ExecCommand getExecCommandForHeapDump(String scriptName, Jvm jvm) {
    final String trimmedJvmName = StringUtils.deleteWhitespace(jvm.getJvmName());

    final String jvmRootDir = Paths.get(jvm.getTomcatMedia().getRemoteDir().toString() + '/' + trimmedJvmName + '/' +
            jvm.getTomcatMedia().getRootDir()).normalize().toString();

    final DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyyMMdd.HHmmss");
    final String dumpFile = "heapDump." + trimmedJvmName + "." + formatter.print(DateTime.now());

    final String dumpLiveStr = ApplicationProperties.getAsBoolean(PropertyKeys.JMAP_DUMP_LIVE_ENABLED.name()) ? "live," : "\"\"";

    final String heapDumpDir = jvm.getTomcatMedia().getRemoteDir().normalize().toString() + "/" + jvm.getJvmName();

    return new ExecCommand(getFullPathScript(jvm, scriptName), jvm.getJavaHome(), heapDumpDir, dumpFile,
                           dumpLiveStr , jvmRootDir, jvm.getJvmName());
}
 
开发者ID:cerner,项目名称:jwala,代码行数:24,代码来源:JvmCommandFactory.java

示例3: formatPostcode

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public static String formatPostcode(String postcode) {
    String formattedPostcode = StringUtils.deleteWhitespace(postcode.toUpperCase());

    if ((formattedPostcode.length() >= 5) && (formattedPostcode.length() <= 7)) {
        formattedPostcode =
                StringUtils.substring(formattedPostcode, 0, formattedPostcode.length() - 3)
                        + " "
                        + StringUtils.substring(formattedPostcode, formattedPostcode.length() - 3);
    }

    return formattedPostcode;
}
 
开发者ID:endeavourhealth,项目名称:HL7Receiver,代码行数:13,代码来源:AddressConverter.java

示例4: getExecCommandForDeploy

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
/**
 * Method to generate remote command for extracting jar for jvm
 *
 * @param jvm
 * @return
 */
private ExecCommand getExecCommandForDeploy(Jvm jvm) {
    final String remoteScriptDir = ApplicationProperties.getRequired(PropertyKeys.REMOTE_SCRIPT_DIR);

    final String trimmedJvmName = StringUtils.deleteWhitespace(jvm.getJvmName());
    final String archivePath = Paths.get(remoteScriptDir + '/' + trimmedJvmName + '/'
            + DEPLOY_CONFIG_ARCHIVE_SCRIPT_NAME).normalize().toString();
    final String jvmJarFile = Paths.get(remoteScriptDir + '/' + trimmedJvmName + ".jar").normalize().toString();
    final String jvmInstanceDir = Paths.get(jvm.getTomcatMedia().getRemoteDir().toString() + '/' + trimmedJvmName)
            .normalize().toString();
    final String jdkJarDir = Paths.get(jvm.getJavaHome() + "/bin/jar").normalize().toString();

    return new ExecCommand(archivePath, jvmJarFile, jvmInstanceDir, jdkJarDir);
}
 
开发者ID:cerner,项目名称:jwala,代码行数:20,代码来源:JvmCommandFactory.java

示例5: convertToCamelCase

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
private static String convertToCamelCase(final String inString) {
    String str = inString.trim();
    if (StringUtils.contains(str, '-') || StringUtils.contains(str, ' ')) {
        str = inString.replace('-', ' ');
        str = WordUtils.capitalizeFully(str);
        str = StringUtils.deleteWhitespace(str);
    }

    return StringUtils.uncapitalize(str);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:11,代码来源:DatastoreContextIntrospector.java

示例6: setTitle

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public void setTitle(String title) {
	this.title = title;
	noSpaceTitle = StringUtils.deleteWhitespace(title);
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:5,代码来源:PullRequest.java

示例7: formatPid

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
private static String formatPid(String pid) {
    if (pid == null)
        return null;

    return StringUtils.deleteWhitespace(pid);
}
 
开发者ID:endeavourhealth,项目名称:HL7Receiver,代码行数:7,代码来源:HL7KeyFields.java

示例8: handleSingleStr

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
@Override
protected String handleSingleStr(String input) {
    return StringUtils.deleteWhitespace(input);
}
 
开发者ID:virjar,项目名称:vscrawler,代码行数:5,代码来源:DeleteWhitespace.java

示例9: parse

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public static LocalDateTime parse(String dateTime) throws ParseException {
        Validate.notNull(dateTime);

        dateTime = StringUtils.deleteWhitespace(dateTime);

        dateTime = removeSecondComponent(dateTime);

        if (dateTime == "")
            return null;

        if (!isValidTs(dateTime))
            throw new ParseException("Invalid date/time");

//        String timeZone = getTimeZone(dateTime);
        dateTime = removeTimeZone(dateTime);

        if (dateTime.length() < 8)
            dateTime = handleShortDates(dateTime);

        String pattern = getPattern(dateTime);
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);

        if (dateTime.length() == 8)
            return LocalDate.parse(dateTime, formatter).atStartOfDay();

        return LocalDateTime.parse(dateTime, formatter);
    }
 
开发者ID:endeavourhealth,项目名称:HL7Receiver,代码行数:28,代码来源:DateParser.java


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