Skip to main content

string.format() (SAP KC)


Replaces placeholders with values in a string.
 

Parameters

Name Type Description
text str string with placeholders
values any (optional) values to insert into string

Usage

The following table shows argument combinations and their outcome.

text values Result
nil   nil
""   ""
"Hi $0!" [ "Bob", "Charles" ] "Hi Bob!"
"Hi $first!" { first: "Bob", second: "Charles" } "Hi Bob!"

Related

Topics
SAP Knowledge Central by MindTouch
Launching and maintaining your MindTouch site requires numerous stakeholders from your organization. Each stakeholder has various responsibilities such as Content, Branding, Integration, Security and more. The MindTouch documentation is organized by responsibilities. Each responsibility contains documentation and tasks to help educate and drive completion.
Analyze your site.
Discover the best ways to analyze your content and community feedback in MindTouch. This guide is most useful for Content Managers and Site Owners.
Analyze user behavior (SAP KC)
Get to know your users and use that knowledge to transform your content to provide the best possible user search experience. This guide is most valuable for Content Managers and Site Owners.
Analytics: Best Practices (SAP KC)
Find guidance on achieving superior results with MindTouch Best Practices. Our Best Practices are your authoritative source on successfully leveraging the power of your content.
Brand your site.
Impress your users and internal stakeholders with a beautifully branded MindTouch site. Successful branding drives adoption, increases brand equity and builds credibility. This guide is most valuable for graphic designers and web developers.
Branding: Best Practices (SAP KC)
Find guidance on achieving superior results with MindTouch Best Practices. Our Best Practices are your authoritative source on successfully leveraging the power of your content.
Brand via self-service (SAP KC)
MindTouch has the ability to be completely white-labeled to match your brand identity. Keep in mind that branding your MindTouch site requires some experience with HTML, CSS and possibly JavaScript. This guide is most valuable for Designers and Developers.
Brand SAP Knowledge Central by MindTouch (SAP KC)
This guide provides an overview of all available functionality needed to brand your site, including custom regions, media queries, iconography, custom CSS, HTML techniques, proper hierarchy structuring, a product UI walk-through, and much more.
Branding: FAQs (SAP KC)
Have a MindTouch question? Likely you are not alone. Peruse our FAQs to find answers to the most commonly asked questions.
Develop with scripts.
Successfully leverage the power of MindTouch and your content by enhancing your site with scripts such as our built-in programming language DekiScript and the MindTouch API. This guide is most valuable to Technical Writers and Developers.
Scripting: Best Practices (SAP KC)
Find guidance on achieving superior results with MindTouch Best Practices. Our Best Practices are your authoritative source on successfully leveraging the power of your content.
Enhance with APIs (SAP KC)
Enhance your site with the MindTouch API documentation.
Enhance with DekiScript (SAP KC)
MindTouch has a built-in programming language called DekiScript that allows you to access system information and add business logic to your MindTouch articles. This guide is most valuable for Technical Writers and Developers.
DekiScript functions (SAP KC)
Use these DekiScript functions to optimize your content.
Date functions (SAP KC)
These date functions are part the DekiScript and MindTouch runtime environment.
JSON functions (SAP KC)
These JSON functions are part the DekiScript and MindTouch runtime environment.
List functions (SAP KC)
These list functions are part the DekiScript and MindTouch runtime environment.
Map functions (SAP KC)
These map functions are part the DekiScript and MindTouch runtime environment.
Media extension (SAP KC)
This extension contains functions for embedding various media types.
Meta functions (SAP KC)
These meta functions are part the DekiScript and MindTouch runtime environment
Num functions (SAP KC)
These num functions are part the DekiScript and MindTouch runtime environment.
String functions (SAP KC)
These string functions are part the DekiScript and MindTouch runtime environment.
URI functions (SAP KC)
These URI functions are part the DekiScript and MindTouch runtime environment.
DekiScript objects (SAP KC)
Use these DekiScript objects to optimize your content.
Get started with DekiScript (SAP KC)
Learn about our built-in scripting language DekiScript and get started on further enhancing your content.
Use DekiScript (SAP KC)
Take advantage of power features to bring your content to the next level. Use DekiScript to add variables, dynamic lists and more.
Enhance with global variables (SAP KC)
Enhance your site with global variables.
Scripting: FAQs (SAP KC)
Have a MindTouch question? Likely you are not alone. Peruse our FAQs to find answers to the most commonly asked questions.
References
Other
  • Was this article helpful?