String placehodler = 'Hello {0} , {1} is cool!';
List<String> fillers = new String[]{'Jason','Apex'};
String formatted = String.format(placehodler,fillers);
System.assertEquals('Hello Jason , Apex is cool!',formatted);

结果如下所示

Anonymous execution was successful.

38.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO
Execute Anonymous: String placehodler = 'Hello {0} , {1} is cool!';
Execute Anonymous: List<String> fillers = new String[]{'Jason','Apex'};
Execute Anonymous: String formatted = String.format(placehodler,fillers);
Execute Anonymous: System.assertEquals('Hello Jason , Apex is cool!',formatted);
13:50:33.21 (21991712)|USER_INFO|[EXTERNAL]|0056F00000652OT|weizhen.zhao@pactera.com|中国标准时间|GMT+08:00
13:50:33.21 (22007848)|EXECUTION_STARTED
13:50:33.21 (22013825)|CODE_UNIT_STARTED|[EXTERNAL]|execute_anonymous_apex
13:50:33.22 (22913817)|CUMULATIVE_LIMIT_USAGE
13:50:33.22 (22913817)|LIMIT_USAGE_FOR_NS|(default)|
Number of SOQL queries: 0 out of 100
Number of query rows: 0 out of 50000
Number of SOSL queries: 0 out of 20
Number of DML statements: 0 out of 150
Number of DML rows: 0 out of 10000
Maximum CPU time: 0 out of 10000
Maximum heap size: 0 out of 6000000
Number of callouts: 0 out of 100
Number of Email Invocations: 0 out of 10
Number of future calls: 0 out of 50
Number of queueable jobs added to the queue: 0 out of 50
Number of Mobile Apex push calls: 0 out of 10 13:50:33.22 (22913817)|CUMULATIVE_LIMIT_USAGE_END 13:50:33.21 (22953824)|CODE_UNIT_FINISHED|execute_anonymous_apex
13:50:33.21 (25331707)|EXECUTION_FINISHED

最新文章

  1. Android 旋转屏幕--处理Activity与AsyncTask的最佳解决方案
  2. How to Operate SharePoint User Alerts with PowerShell
  3. 项目配置laungchImage
  4. ios 简单的倒计时验证码数秒过程实现
  5. CSS中 opacity的设置影响了index(层数)的改变
  6. HTTP Status 500 - Servlet.init() for servlet htmlWebConfig threw exception
  7. Idea facet
  8. 将数据从服务器端同步到手机上, 并且需要离线工作,Couchebase Mobile 也许是目前最好的解决方案:
  9. saltstack布署实践 【安装】
  10. web从入门开始(3)-----第一个网页
  11. Android开发随手记
  12. Java中断机制(interrupt)
  13. Podfile语法参考
  14. CASE WHEN 及 SELECT CASE WHEN的用法
  15. Python爱好者社区历史文章列表(每周append更新一次)
  16. kubernetes实战(十三):k8s使用helm持久化部署harbor集成openLDAP登录
  17. STL标准库-容器适配器
  18. vue-compile概述
  19. UWP 在 WebView 中执行 JavaScript 代码(用于模拟用户输入等)
  20. 部署mysql版本项目问题记录

热门文章

  1. spring boot 尚桂谷学习笔记07 嵌入式容器 ---Web
  2. T1215:迷宫
  3. iis 跨域设置多域名
  4. RSA加密、解密实现原理
  5. Python快速设置Excel表格边框
  6. Comet OJ - Contest #12
  7. Skimap_ros 利用RGBD创建Octomap(一)
  8. Java8 LocalDate操作时间和日期的API
  9. vue项目在webpack打包后背景图片显示不了
  10. java 多线程间通信(二)