روش های رشته ای

روش های رشته ای

روش های رشته ای
روش های رشته ای برای پردازش متغیرهای رشته ای و آرایه های رشته ای استفاده می شود.

 
Name
Syntax
Description
concat
String concat(String separator, String … strs)
Concatenates the given varargs-array of strings into a single string using the given separator.
concat
String[] concat(String colSepar, String rowSepar, String[]… matr)
Concatenates the given string matrix (which can be given as a varargs of rows) into a single string. Puts colSepar between values of columns of a row, and rowSepar between rows.
contains
boolean contains(String[] strs, String str)
Returns true if the given string array strs contains the given string str.
find
int[] find(String[] strs, String str)
Returns an array with the indices to all occurrences of str in strs.
findIn
int findIn(String[] strs, String str)
Returns the index to the first occurrence of str in strs or -1 if no match.
findIn
int findIn(String str, String toFind)
Returns the first index of str that is the start of the substring toFind. If there is no substring matching toFind in str-1 is returned.
length
int length(String str)
Returns the length of the string str.
replace
String replace(String str, String orig, String replacement)
Returns a string where orig has been replaced by replacement.
split
String[] split(String str)
Returns an array of strings by splitting the given string at spaces.
split
String[] split(String str, String separator)
Returns an array of strings by splitting the given string at the given separator.
substring
String substring(String str, int start, int length)
Returns a substring with the given length starting at the given position.
unique
String[] unique(String[] strs)
Returns an array of strings with the unique values in the given array of strings.