Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen

Replacing

replace(text, String repl, String with)

Replaces all occurrences of a String within another String.

replace(text, String repl, String with, int max)

Replaces a String with another String inside a larger String, for the first max values of the search String.

replaceOnce(text, String repl, String with)

Replaces a String with another String inside a larger String, once.

Samples

number decimal separator to "."

Code Block
return replace(value(), ".", ",")

Trimming and whitespaces cleaning

strip(str, String stripChars)

Strips any of a set of characters from the start and end of a String.

String[] stripAll(String[] strs)

Strips whitespace from the start and end of every String in an array.

String[] stripAll(String[] strs, String stripChars)

Strips any of a set of characters from the start and end of every String in an array.

stripEnd(str, String stripChars)

Strips any of a set of characters from the end of a String.

stripStart(str, String stripChars)

Strips any of a set of characters from the start of a String.

trim(str)

Removes control characters (char <= 32) from both ends of this String, handling null by returning null.

chomp(str)

Removes one newline from end of a String if it's there, otherwise leave it alone.

chomp(str, String separator)

Removes separator from the end of str if it's there, otherwise leave it alone.

deleteWhitespace(str)

Deletes all whitespaces from a String.

Samples

Basic trimming of all whitespaces after and before cell content:

Code Block
return trim(value());

Case manipulation

swapCase(str)

Swaps the case of a String changing upper and title case to lower case, and lower case to upper case.

uncapitalize(str)

Uncapitalizes a String changing the first letter to title case.

lowerCase(str)

Converts a String to lower case as per String.toLowerCase().

upperCase(str)

Converts a String to upper case.

Next steps:

 

Sv translation
languageja

リプレイシング 

replace(text, String repl, String with)

別の文字列で文字列のすべての出現回を交換します。

replace(text, String repl, String with, int max)

検索文字列の最初の最大値に対して、より大きな文字列での文字列を別の文字列で交換します。

replaceOnce(text, String repl, String with)

一度、より大きな文字列の内に文字列を別の文字列で交換します。

 

サンプル 

"。"の数の桁区切り文字

Code Block
return replace(value(), ".", ",")

トリミングと空白のクリーニング 

strip(str, String stripChars)

文字列の先頭と末尾から文字のセットのいずれかを取り除きます。

String[] stripAll(String[] strs)

配列内のすべての文字列の先頭と末尾から空白を取り除きます。

String[] stripAll(String[] strs, String stripChars)

配列内のすべての文字列の先頭と末尾から文字のセットのいずれかを取り除きます。

stripEnd(str, String stripChars)

文字列の末尾から文字のセットのいずれかを取り除きます。

stripStart(str, String stripChars)

文字列の先頭から文字のセットのいずれかを取り除きます。

trim(str)

この文字列の両端から制御文字を(文字<=32)を削除し、nullを返却しますことによって、null処理します。

chomp(str)

文字列の末尾から1つの新行を削除し、そうでない場合は単独でそれを残します。

chomp(str, String separator)

STRの末尾から区切り文字を削除し、そうでない場合は単独でそれを残します。

deleteWhitespace(str)

文字列からすべての空白を削除します。

サンプル 

セルの内容の前と後にすべての空白を基本的にトリミングします。

Code Block
return trim(value());

ケース操作 

swapCase(str)

大文字に、文字ごとの大文字を小文字に、小文字を大文字に変更することで文字列文字のタイプをれ替えます。

uncapitalize(str)

タイトルケースへの最初の文字を変更することで文字列の大文字にすることをキャンセルします。

lowerCase(str)

文字列をString.toLowerCase()ごとに小文字に変換します。

upperCase(str)

文字列を大文字に変換します。

次に: