- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中net.sf.okapi.common.XMLWriter
类的一些代码示例,展示了XMLWriter
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLWriter
类的具体详情如下:
包路径:net.sf.okapi.common.XMLWriter
类名称:XMLWriter
[英]Helper class to write XML documents.
IMPORTANT: flush() or close() must always be called to assure all content is flushed to the underlying streams.
If a StringWriter is used the flush() or close() must be be called before calling the toString() method
[中]帮助类来编写XML文档。
重要提示:必须始终调用flush()或close(),以确保将所有内容刷新到底层流。
如果使用StringWriter,则必须在调用toString()方法之前调用flush()或close()
代码示例来源:origin: net.sf.okapi.connectors/okapi-connector-microsoft
public String toXML() {
StringWriter sw = new StringWriter();
XMLWriter xmlWriter = new XMLWriter(sw);
xmlWriter.writeStartDocument();
xmlWriter.writeStartElement("GetTranslationsArrayRequest");
xmlWriter.writeElementString("AppId", "");
xmlWriter.writeElementString("From", srcLang);
xmlWriter.writeStartElement("Options");
xmlWriter.writeAttributeString("xmlns:o", "http://schemas.datacontract.org/2004/07/Microsoft.MT.Web.Service.V2");
xmlWriter.writeElementString("o:Category", category);
xmlWriter.writeElementString("o:ContentType", contentType);
xmlWriter.writeElementString("o:ReservedFlags", "");
xmlWriter.writeElementString("o:State", "");
xmlWriter.writeElementString("o:Uri", "");
xmlWriter.writeElementString("o:User", "");
xmlWriter.writeEndElement(); // Options
xmlWriter.writeStartElement("Texts");
xmlWriter.writeAttributeString("xmlns:s", "http://schemas.microsoft.com/2003/10/Serialization/Arrays");
for (String text : texts) {
xmlWriter.writeStartElement("s:string");
xmlWriter.writeString(text);
xmlWriter.writeEndElement();
xmlWriter.writeEndElement(); // !Texts
xmlWriter.writeElementString("To", trgLang);
xmlWriter.writeElementString("MaxTranslations", String.valueOf(maxHits));
xmlWriter.writeEndElement(); // !GetTranslationsArrayRequest
xmlWriter.writeEndDocument();
xmlWriter.close();
return sw.toString();
代码示例来源:origin: net.sf.okapi.steps/okapi-step-gttbatchtranslation
private void startExtractedBlock () {
try {
File tmpFile = File.createTempFile("~okapi-45_gttbt_", ".html");
blocks.add(tmpFile);
// Create the HTML file
htmlWriter = new XMLWriter(tmpFile.getPath());
// Start building the source file
htmlWriter.writeStartElement("html");
htmlWriter.writeStartElement("meta");
htmlWriter.writeAttributeString("http-equiv", "Content-Type");
htmlWriter.writeAttributeString("content", "text/html; charset=UTF-8");
htmlWriter.writeEndElementLineBreak();
count = 100; // Roughly
}
catch ( IOException e ) {
throw new OkapiIOException("Error creating extraction file.", e);
}
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-translationcomparison
private void printBracket (int index,
String range)
{
writer.writeRawXML("<tr "+
((index % 2)==0 ? "" : "bgcolor=#FFFFCC")
+ "><td>"+range+"</td>"); //$NON-NLS-1$
writer.writeRawXML(String.format("<td align='right'>%d</td>", edBrackets[index])); //$NON-NLS-1$
// ED-Scores
writer.writeRawXML(((itemCount == 0) ? "<td align='right'>NA</td>" : String.format("<td align='right'>%.0f</td>", (float)edBrackets[index]/itemCount*100))); //$NON-NLS-1$
writer.writeRawXML(String.format("<td align='right'>%d</td>", edWCBrackets[index])); //$NON-NLS-1$
writer.writeRawXML(((wcTotal == 0) ? "<td align='right'>NA</td>" : String.format("<td align='right'>%.0f</td>", (float)edWCBrackets[index]/wcTotal*100))); //$NON-NLS-1$
writer.writeRawXML(String.format("<td align='right'>%d</td>", fmBrackets[index])); //$NON-NLS-1$
// FM-Scores
writer.writeRawXML(((itemCount == 0) ? "<td align='right'>NA</td>" : String.format("<td align='right'>%.0f</td>", (float)fmBrackets[index]/itemCount*100))); //$NON-NLS-1$
writer.writeRawXML(String.format("<td align='right'>%d</td>", fmWCBrackets[index])); //$NON-NLS-1$
writer.writeRawXML(((wcTotal == 0) ? "<td align='right'>NA</td>" : String.format("<td align='right'>%.0f</td>", (float)fmWCBrackets[index]/wcTotal*100))); //$NON-NLS-1$
writer.writeRawXML("</tr>\n"); //$NON-NLS-1$
}
代码示例来源:origin: net.sf.okapi/okapi-core
/**
* Writes the end of the TMX document.
*/
public void writeEndDocument () {
writer.writeEndElementLineBreak(); // body
writer.writeEndElementLineBreak(); // tmx
writer.writeEndDocument();
}
代码示例来源:origin: net.sf.okapi.lib/okapi-lib-persistence
@Override
protected void endWriting(OutputStream outStream) {
writer.writeEndElementLineBreak(); // body
writer.writeEndDocument();
writer.close();
}
代码示例来源:origin: net.sf.okapi.lib/okapi-lib-persistence
@Override
protected void startWriting(OutputStream outStream) {
//this.outStream = outStream;
prWriter = new PrintWriter(outStream);
writer = new XMLWriter(prWriter);
writer.writeStartDocument();
writer.writeStartElement("body");
writer.writeLineBreak();
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-rainbowkit
XR = new XMLWriter(projectSaveFile);
XR.writeStartDocument();
XR.writeStartElement("omegat");
XR.writeStartElement("project");
XR.writeAttributeString("version", "1.0");
XR.writeStartElement("source_dir");
XR.writeRawXML("__DEFAULT__");
XR.writeEndElementLineBreak(); // source_dir
XR.writeStartElement("target_dir");
XR.writeRawXML("__DEFAULT__");
XR.writeEndElementLineBreak(); // target_dir
XR.writeStartElement("tm_dir");
XR.writeRawXML("__DEFAULT__");
XR.writeEndElementLineBreak(); // tm_dir
XR.writeStartElement("glossary_dir");
XR.writeRawXML("__DEFAULT__");
XR.writeEndElementLineBreak(); // glossary_dir
XR.writeStartElement("dictionary_dir");
XR.writeRawXML("__DEFAULT__");
XR.writeEndElementLineBreak(); // dictionary_dir
XR.writeStartElement("source_lang");
XR.writeRawXML(manifest.getSourceLocale().toString());
XR.writeEndElementLineBreak(); // source_lang
代码示例来源:origin: net.sf.okapi/okapi-core
writer.writeStartElement("tu");
if ( !Util.isEmpty(tuid) ) {
writer.writeAttributeString("tuid", tuid);
writer.writeLineBreak();
writer.writeStartElement("prop");
writer.writeAttributeString("type", name);
writer.writeString(attributes.get(name));
writer.writeEndElementLineBreak(); // prop
writer.writeStartElement("tuv");
writer.writeAttributeString("xml:lang", srcLoc.toBCP47());
writer.writeStartElement("seg");
writer.writeRawXML(tmxCont.setContent(source).toString());
writer.writeEndElement(); // seg
writer.writeEndElementLineBreak(); // tuv
writer.writeStartElement("tuv");
writer.writeAttributeString("xml:lang",
((altTrgLoc != null) ? altTrgLoc.toBCP47() : trgLoc.toBCP47()));
writer.writeAttributeString(CREATIONID, attributes.get(CREATIONID));
writer.writeStartElement("seg");
writer.writeRawXML(tmxCont.setContent(target).toString());
writer.writeEndElement(); // seg
writer.writeEndElementLineBreak(); // tuv
代码示例来源:origin: net.sf.okapi.lib/okapi-lib-segmentation
private void saveRules(XMLWriter writer, boolean saveExtensions, boolean saveNonValidInfo) {
try {
writer.writeStartDocument();
if (docComment != null) {
writer.writeComment(docComment, true);
writer.writeStartElement("srx");
writer.writeAttributeString("xmlns", NSURI_SRX20);
if (saveExtensions) {
writer.writeAttributeString("xmlns:" + NSPREFIX_OKPSRX, NSURI_OKPSRX);
writer.writeAttributeString("version", "2.0");
version = "2.0";
writer.writeLineBreak();
writer.writeComment(headerComment, true);
writer.writeStartElement("header");
writer.writeAttributeString("segmentsubflows", (segmentSubFlows ? "yes" : "no"));
writer.writeAttributeString("cascade", (cascade ? "yes" : "no"));
writer.writeLineBreak();
writer.writeStartElement("formathandle");
writer.writeAttributeString("type", "start");
writer.writeAttributeString("include", (includeStartCodes ? "yes" : "no"));
writer.writeEndElementLineBreak(); // formathandle
writer.writeStartElement("formathandle");
writer.writeAttributeString("type", "end");
writer.writeAttributeString("include", (includeEndCodes ? "yes" : "no"));
代码示例来源:origin: net.sf.okapi.connectors/okapi-connector-microsoft
public String toXML() {
StringWriter sw = new StringWriter();
XMLWriter xml = new XMLWriter(sw);
xml.writeStartDocument();
xml.writeStartElement("TranslateOptions");
xml.writeAttributeString("xmlns", "http://schemas.datacontract.org/2004/07/Microsoft.MT.Web.Service.V2");
xml.writeStartElement("Category");
xml.writeString(this.category);
xml.writeEndElement();
xml.writeStartElement("ContentType");
xml.writeString(this.contentType);
xml.writeEndElement();
xml.writeStartElement("ReservedFlags");
xml.writeEndElement();
xml.writeStartElement("State");
xml.writeEndElement();
xml.writeStartElement("Uri");
xml.writeEndElement();
xml.writeStartElement("User");
xml.writeString("defaultUser");
xml.writeEndElement();
xml.writeEndElement(); // !TranslateOptions
xml.close();
return sw.toString();
}
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-translationcomparison
if ( writer != null ) writer.close();
if ( prnWriter != null ) prnWriter.close();
writer = new XMLWriter(getOutputFilename()); //$NON-NLS-1$
writer.writeStartDocument();
writer.writeStartElement("html"); //$NON-NLS-1$
writer.writeStartElement("head"); //$NON-NLS-1$
writer.writeRawXML("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"); //$NON-NLS-1$
writer.writeRawXML("<style>td { font-family: monospace } td { vertical-align: top; white-space: pre } td.p { border-top-style: solid; border-top-width: 1px;}</style>"); //$NON-NLS-1$
writer.writeEndElement(); // head
writer.writeStartElement("body"); //$NON-NLS-1$
writer.writeStartElement("h1"); //$NON-NLS-1$
writer.writeString("Translation Comparison");
writer.writeEndElement();
writer.writeStartElement("p"); //$NON-NLS-1$
writer.writeString(String.format("Base document (%s): %s",
params.getDocument1Label(), baseDocumentPath));
writer.writeRawXML("<br>");
writer.writeString(String.format("Comparison 1 (%s): %s",
params.getDocument2Label(), compDocumentPath));
if ( rawDoc3 != null ) {
writer.writeRawXML("<br>");
writer.writeString(String.format("Comparison 2 (%s): %s",
params.getDocument3Label(), rawDoc3.getInputURI().getPath()));
writer.writeString(".");
writer.writeEndElement();
writer.writeRawXML("<p>ED-Score = Edit distance score, FM-Score = Fuzzy Match score.<br/>For details see: "
+"<a href='"+WIKIURL+"'>"+WIKIURL+"</a>.</p>");
代码示例来源:origin: net.sf.okapi.steps/okapi-step-translationcomparison
writer.writeEndElement(); // table
writer.writeElementString("p", String.format("", itemCount));
if ( itemCount > 0 ) {
writer.writeStartElement("h2"); //$NON-NLS-1$
writer.writeAttributeString("id", "summary");
writer.writeString("Summary");
writer.writeEndElement();
writer.writeElementString("p", String.format("Repartition for %s to %s:", params.getDocument1Label(), params.getDocument2Label()));
writer.writeRawXML("<table border=1 cellspacing=0 cellpadding=5>"); //$NON-NLS-1$
writer.writeRawXML("<tr><th rowspan=2>Scores</th><th colspan=4>ED-Scores</th><th colspan=4>FM-Scores</th></tr>");
writer.writeRawXML("<tr>"
+ "<th style=\"text-align: right; width: 100px;\">Segments </th>"
+ "<th style=\"text-align: right; width: 100px;\">% </th>"
printBracket(1, "10 - 19");
printBracket(0, "0 - 9");
writer.writeRawXML("<tr><td>Total</td>"); //$NON-NLS-1$
writer.writeRawXML(String.format("<td align='right'>%d</td>", itemCount)); //$NON-NLS-1$
writer.writeRawXML("<td align='right'>100%</td>"); //$NON-NLS-1$
writer.writeRawXML(String.format("<td align='right'>%d</td>", wcTotal)); //$NON-NLS-1$
writer.writeRawXML("<td align='right'>100%</td>"); //$NON-NLS-1$
writer.writeRawXML(String.format("<td align='right'>%d</td>", itemCount)); //$NON-NLS-1$
writer.writeRawXML("<td align='right'>100%</td>"); //$NON-NLS-1$
writer.writeRawXML(String.format("<td align='right'>%d</td>", wcTotal)); //$NON-NLS-1$
writer.writeRawXML("<td align='right'>100%</td>"); //$NON-NLS-1$
writer.writeRawXML("</tr>\n"); //$NON-NLS-1$
代码示例来源:origin: net.sf.okapi.steps/okapi-step-gttbatchtranslation
htmlWriter.writeStartElement("p");
String out = String.format("%d:%s:%s", subDocId, tu.getId(), seg.id);
count += (out.length() + 10);
htmlWriter.writeAttributeString("id", out);
out = qutil.toCodedHTML(seg.text);
try {
htmlWriter.writeRawXML(out);
htmlWriter.writeEndElementLineBreak(); // p
代码示例来源:origin: net.sf.okapi/okapi-core
writer = new XMLWriter(xliffPath);
} else if ( outputStream != null ) {
writer = new XMLWriter(new OutputStreamWriter(outputStream, StandardCharsets.UTF_8));
writer.writeStartDocument();
writer.writeStartElement("xliff");
writer.writeAttributeString("version", "1.2");
writer.writeAttributeString("xmlns", Namespaces.NS_XLIFF12);
writer.writeAttributeString("xmlns:okp", Namespaces.NS_XLIFFOKAPI);
if ( params.getIncludeIts() ) {
writer.writeAttributeString("xmlns:"+Namespaces.ITS_NS_PREFIX, Namespaces.ITS_NS_URI);
writer.writeAttributeString("xmlns:"+Namespaces.ITSXLF_NS_PREFIX, Namespaces.ITSXLF_NS_URI);
writer.writeAttributeString(Namespaces.ITS_NS_PREFIX+":version", "2.0");
writer.writeLineBreak();
writer.writeComment(message, false);
writer.writeLineBreak();
代码示例来源:origin: net.sf.okapi/okapi-core
writer.writeStartDocument();
writer.writeStartElement("tmx");
writer.writeAttributeString("version", "1.4");
writer.writeStartElement("header");
writer.writeAttributeString("creationtool",
(creationTool == null) ? "unknown" : creationTool);
writer.writeAttributeString("creationtoolversion",
(creationToolVersion == null) ? "unknown" : creationToolVersion);
writer.writeAttributeString("segtype",
(segType == null) ? "paragraph" : segType);
writer.writeAttributeString("o-tmf",
(originalTMFormat == null) ? "unknown" : originalTMFormat);
writer.writeAttributeString("adminlang", "en");
writer.writeAttributeString("srclang", srcLoc.toBCP47());
writer.writeAttributeString("datatype",
(dataType == null) ? "unknown" : dataType);
Property p = startDocument.getProperty(n);
if ("note".equalsIgnoreCase(p.getName())) {
writer.writeStartElement("note");
writer.writeString(p.getValue());
writer.writeEndElement();
} else {
writer.writeStartElement("prop");
writer.writeAttributeString("type", p.getName());
writer.writeString(p.getValue());
writer.writeEndElement();
代码示例来源:origin: net.sf.okapi/okapi-core
writer.writeStartElement("trans-unit");
writer.writeAttributeString("id", tu.getId());
String tmp = tu.getName();
if ( !Util.isEmpty(tmp) ) {
writer.writeAttributeString("resname", tmp);
writer.writeAttributeString("coord", tu.getProperty(Property.COORDINATES).getValue());
writer.writeAttributeString("restype", tmp);
writer.writeAttributeString("restype", "x-"+tmp);
writer.writeAttributeString("translate", "no");
String value = ann.getString(GenericAnnotationType.LOCFILTER_VALUE);
if ( !ITSContent.isExtendedMatch(value, trgLoc.toBCP47()) ) {
writer.writeAttributeString("translate", "no");
writer.writeAttributeString("phase-name", phaseName);
if ( tu.hasTargetProperty(trgLoc, Property.APPROVED) ) {
if ( tu.getTargetProperty(trgLoc, Property.APPROVED).getValue().equals("yes") ) {
writer.writeAttributeString(Property.APPROVED, "yes");
writer.writeAttributeString("xml:space", "preserve");
writer.appendRawXML(sbITS.toString());
writer.writeLineBreak();
代码示例来源:origin: net.sf.okapi/okapi-core
protected void writeProp(String name, String value) {
// Write out the property
if (expandDuplicateProps) {
StringTokenizer st = new StringTokenizer(value, propValueSep, false);
while (st.hasMoreTokens()) {
writer.writeStartElement("prop");
writer.writeAttributeString("type", name);
writer.writeString(st.nextToken());
writer.writeEndElementLineBreak(); // prop
}
} else {
writer.writeStartElement("prop");
writer.writeAttributeString("type", name);
writer.writeString(value);
writer.writeEndElementLineBreak(); // prop
}
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-rainbowkit
report = new XMLWriter(reportPath);
report.writeStartDocument();
report.writeRawXML("<h1>Transifex Package Summary</h1>");
report.writeLineBreak();
report.writeRawXML(String.format("<p>Resources uploaded to Transifex in the project "
+ "<b><a target='_blank' href='%s'>%s</a></b></p>",
options.getServerWithoutAPI() + "projects/p/" + options.getProjectId() + "/",
options.getProjectName()));
report.writeLineBreak();
report.writeRawXML("<table border='1' cellspacing='0' cellpadding='5'>");
report.writeRawXML("<tr><th>Transifex Resource</th><th>Original Source File</th></tr>");
report.writeLineBreak();
report.writeRawXML(String.format("<tr><td><a target='_blank' href=\"%s\">%s</a></td>",
options.getServerWithoutAPI() + "projects/p/" + options.getProjectId() + "/language/"+manifest.getSourceLocale().toPOSIXLocaleId()+"/",
resourceFile));
report.writeRawXML(String.format("<td>%s</td></tr>", info.getRelativeInputPath()));
report.writeLineBreak();
report.writeRawXML("</table>");
report.writeRawXML("<p>For more information about this package, see: "
+ "<a target='_blank' href='http://www.opentag.com/okapi/wiki/index.php?title=Rainbow_TKit_-_Transifex_Project'>"
+ "Rainbow TKit - Transifex Project</a>.");
report.writeRawXML("<p><font size='2'>Note: This report was generated when creating the translation package, "
+ "the Transifex project may have been updated with other files since.</font></p>");
report.close();
if ( report != null ) report.close();
if ( pw != null ) pw.close();
代码示例来源:origin: net.sf.okapi/okapi-core
writer.writeStartElement("tu");
if ( srcCont.contentIsOneSegment() ) {
writer.writeAttributeString("tuid", tuid);
writer.writeAttributeString("tuid", String.format("%s_%s", tuid, srcSeg.id));
writer.writeLineBreak();
writer.writeEndElementLineBreak(); // tu
writer.flush();
代码示例来源:origin: net.sf.okapi.steps/okapi-step-leveraging
private void finishTemporaryFiles (XMLWriter htmlWriter) {
// Close the temporary source input
if ( htmlWriter != null ) {
htmlWriter.writeEndElement(); // html
htmlWriter.writeEndDocument();
htmlWriter.close();
// htmlWriter should be reset to null by the caller
}
// Close the original entry store
if ( store != null ) {
store.close();
}
}
最近,我开始学习 cuis-smalltalk,我没有意识到与 CLOS 相比,Smalltalk 的 OOP 有多么深刻和深入(我使用的是 Ruby)。我了解到 Smalltalk 是一个自己实现的
Maven存储库包含以下两个依赖项:org.apache.commons:commons-io:1.3.2和commons-io:commons-io:1.3.2。有什么区别,我应该在pom.xml中
我刚刚在我的 pom 文件中看到 Apache commons-collections 有两个不同的组 ID: commons-collections commons-collect
Windows 上的 Common Lisp 中是否有用于串行端口通信的库? 最佳答案 下面是一些使用 SBCL 外部函数 POSIX 调用实现串行通信的函数。它不如完整的库好,但我解决了根据此协议(
SBCL 64位,1.1.7 如果我想创建一个包并使用package:CL中的一些符号,我将创建一个像这样的包: (defpackage :foo (:import-from :cl
我正在忙着学习Common Lisp,并且正在寻找一种静态代码分析工具,该工具将帮助我开发更好的样式并避免陷入常见的陷阱。 我找到了Lisp Critic,看起来不错,但我希望有人可以推荐其他一些工具
我正在阅读《Practical Common Lisp》一书,在第 22 章第 284 页的脚注 5 中,我看到一段让我感到困惑的代码片段。 我知道变量list和tail有一个共同的列表结构,但我很困
我正在阅读 Practical Common Lisp ,并且对 Lisp 的 COPY-TREE 函数有疑问。 书中给出了调用的例子 (copy-tree '( '(1 2) '(3 4) '(5
我正在尝试使用 user guide 中的抓取示例运行 geb用于引入依赖项: $ cat my.groovy @Grapes([ @Grab("org.gebish:geb-core:0.9
这里一定有更好的方法,对吧? (format t "Enter your age: ~%") (defun age-case (age) (case age (1 (format t "Y
如何在 do 循环中绑定(bind)从函数返回的多个值? 以下显然是非常错误的,但是这样的事情可能吗? (do (((x y z) (3-val-fn) (3-val-fn))) ((equa
所以我正在学习 Lisp 做分数,这很棒。但是为什么这个相等性检查返回 NIL: * (= 0.2 1/5) NIL ...如果转换为 float 则返回 True第一的: * (=
是否可以“统计”一个文件并找到它的文件类型 - 常规或目录? 最佳答案 阅读关于 portable pathname library 的章节来自 Peter Seibel 的 Practical Co
我是 CL 的新手,正在使用 AllegroCL。我试图弄清楚如何组织我的源代码以满足以下要求: 我想阻止 src 代码包含我的测试套件。 我想以可移植的方式声明项目依赖项(src 和 test de
谁能告诉我最新的标准化 Common Lisp 的文档是什么(应该遵循各种实现的文档)?我问是因为我可以在网上找到很多关于 CL 的书都来自 90 年代,所以我想知道它们是否是最新的。我也来自于在 R
假设我必须定义一个名为foo 的函数。假设,为了定义它,我使用了一些辅助函数 foo1, foo2, foo3, ... 当我加载包含这些函数的文件时,我可以从顶层使用所有这些函数。相反,我只想从顶层
这拒绝编译。注释掉 (setf roll行让它编译。然而,(setf roll...本身在 REPL 中正确评估。 程序: ;; loop n times ; sum up number of hit
我目前正在学习 Common Lisp,并尝试将一些 JSON 发送到网络服务。我要发送的 JSON 以类似于以下的结构表示: ((:ITEMS ((:KEY . "value1") (:IGNO
我有一个带波浪号的目录名(作为字符串):~/projects . 我想得到它的完整路径:/home/user/projects .我怎么做 ? 目标是将它传递给 uiop:run-program ,这
我想从输入文件中读取一个字符串(用户可能修改也可能没有修改)。我想将此字符串视为使用固定数量的参数调用的格式指令。但是,我知道某些格式指令(特别是我想到的 ~/)可能会用于注入(inject)函数调用
我是一名优秀的程序员,十分优秀!