String regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len) method in Java

The boolean regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len) method in Java tests if two string regions are equal, with an option to ignore case or not.

Syntax

Let us see the syntax,

Parameters

Let us see the parameters,

  • ignoreCase− if true, ignore case when comparing characters.
  • toffset− starting offset of the subregion in this string.
  • other− string argument
  • ooffset− starting offset of the subregion in the string argument
  • len− number of characters to compare

Example

The following is an example of regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len),

Output

The following is the output,

Java regionmatches method Ignore case

String matches() method in Java
String regionMatches(int toffset, String other, int ooffset, int len) method in Java
Studyopedia Editorial Staff
Studyopedia Editorial Staff
[email protected]

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading