This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // メインクラス | |
| public class MainClass{ | |
| // Javaのエントリポイント | |
| public static void main(String[] arg){ // mainメソッドの定義 | |
| // 文字列str1の定義. | |
| String str1 = "ABC.ABC:ABC!ABC"; | |
| // 正規表現にマッチする部分の置換.(最初の1つだけ.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // メインクラス | |
| public class MainClass{ | |
| // Javaのエントリポイント | |
| public static void main(String[] arg){ // mainメソッドの定義 | |
| // 文字列str1の定義. | |
| String str1 = "ABC.ABC:ABC!ABC"; | |
| // 正規表現にマッチする部分の置換. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // メインクラス | |
| public class MainClass{ | |
| // Javaのエントリポイント | |
| public static void main(String[] arg){ // mainメソッドの定義 | |
| // 文字列str1の定義. | |
| String str1 = "ABCXYZABCXYZ"; | |
| // 文字列の置換. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // メインクラス | |
| public class MainClass{ | |
| // Javaのエントリポイント | |
| public static void main(String[] arg){ // mainメソッドの定義 | |
| // 文字列strの定義. | |
| String str = "ABXYZCDE"; | |
| // 指定の文字列で終わるか判定. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ヘッダのインクルード | |
| #include <iostream> // 標準入出力 | |
| #include <string> // C++文字列 | |
| // main関数 | |
| int main(){ | |
| // オブジェクトの宣言と初期化. | |
| std::basic_string<char> str1 = "ABCDE"; // std::basic_string<char>オブジェクトstr1を"ABCDE"で初期化. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ヘッダファイルのインクルード */ | |
| #include <stdio.h> /* 標準入出力 */ | |
| /* main関数の定義 */ | |
| int main(void){ | |
| /* 変数の初期化・宣言 */ | |
| int ret; | |
| FILE *fp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // メインクラス | |
| public class MainClass{ | |
| // Javaのエントリポイント | |
| public static void main(String[] arg){ // mainメソッドの定義 | |
| // 文字列strの定義. | |
| String str = "ABXYZCDE"; | |
| // 指定の文字列で始まるか判定. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // メインクラス | |
| public class MainClass{ | |
| // Javaのエントリポイント | |
| public static void main(String[] arg){ // mainメソッドの定義 | |
| // 文字列strの定義. | |
| String str = "ABXYZCDE"; | |
| // 指定の文字列が含まれているか判定. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // メインクラス | |
| public class MainClass{ | |
| // Javaのエントリポイント | |
| public static void main(String[] arg){ // mainメソッドの定義 | |
| // 文字列strの定義. | |
| String str = "ABCDEABCDEABCDE"; | |
| // 後方から探索して, 最初に見つかった指定文字列の位置. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // メインクラス | |
| public class MainClass{ | |
| // Javaのエントリポイント | |
| public static void main(String[] arg){ // mainメソッドの定義 | |
| // 文字列strの定義. | |
| String str = "ABCDE"; | |
| // 指定文字列の位置を取得. |
NewerOlder