Data update
This commit is contained in:
parent
61b93a2cd1
commit
5af6d93694
858 changed files with 20572 additions and 2082 deletions
|
|
@ -0,0 +1,14 @@
|
|||
public class RM_chars {
|
||||
public static void main( String[] args ){
|
||||
System.out.println( "knight".substring( 1 ) );
|
||||
System.out.println( "socks".substring( 0, 4 ) );
|
||||
System.out.println( "brooms".substring( 1, 5 ) );
|
||||
// first, do this by selecting a specific substring
|
||||
// to exclude the first and last characters
|
||||
|
||||
System.out.println( "knight".replaceAll( "^.", "" ) );
|
||||
System.out.println( "socks".replaceAll( ".$", "" ) );
|
||||
System.out.println( "brooms".replaceAll( "^.|.$", "" ) );
|
||||
// then do this using a regular expressions
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue