8
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

Apex String

String class

文字列の切り出し

abc.left(n); 左からn文字を切り出し

文字列の長さ

abc.length()

置換

String replaced = abc.replace('@@@xxx@@@', '123') @@@は置換される文字列(戻り値が置換された文字列であることに注意)

文字列の分割

String[] result = abc.split('\r\n') 改行で分割

型変換

String.valueOf(123)
Integer.valueOf('123')

トリム

String trimmed = abc.trim();

改行

public final static String CRLF = '\r\n';

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
8
Help us understand the problem. What are the problem?