LoginSignup
6
8

More than 5 years have passed since last update.

Apex String

Last updated at Posted at 2017-01-25

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';

6
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
8