検索用語を入力
検索フォームを送信
my-Tool.com: 文字列とテキスト - 文字列とテキストを操作する。 - ケース変換
IPアドレス
MaximaPHP
正規表現テスタ
数学
ゲーム
ネットワーク
インターネットコード
日付と時間
文字列とテキスト
ワードドメイン
コードテスタ
ビーワイズビット
ランキン
質問と答え
僕について
フォーラム
AdManner
無料広告サイト
インドネシア語
英語
スプレッドシート
ケース変換
サイト抽出
EditArea
置換
統計
TinyMCE
ケース変換
テキストの文字のケースを大文字、小文字、逆またはランダムに変換する。
このツールは動くのにJavaScriptが必要。ブラウザーでJavaScriptを使用可能にしてください。
ケース変換 テキストの文字のケースを大文字、小文字、逆またはランダムに変換する。 このテキストを自分のものと置き換えるだけで、好きな大文字・小文字に変換することができる。 ごゆっくりケース変換を!
大文字に
小文字に
逆ケースに
ランダムに
このツールを利用したほとんどのお客様は以下のツールも利用しました。
Fungsi 3D
(11.9%),
ケース変換
(9.5%),
DNS
(4.8%)
このツールのソースコードは以下に示す。
<?php /****************************************************************** * * CaseConverter, テキストの文字のケースを大文字、小文字、逆またはランダムに変換する。 * Copyright (C) 2006, Bowo Prasetyo * * http://www.my-tool.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation below, * * http://www.gnu.org/licenses/gpl.html#TOC1 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * このプログラムはフリーソフトウェアです。あなたはこれを、以下のURLにフリーソフトウェ * ア財団によって発行された GNU 一般公衆利用許諾契約書の定める条件の下で * 再頒布または改変することができます。 * * http://www.gnu.org/licenses/gpl.html#TOC1 * * このプログラムは有用であることを願って頒布されますが、*全くの無保証* * です。商業可能性の保証や特定の目的への適合性は、言外に示されたものも含 * め全く存在しません。詳しくはGNU 一般公衆利用許諾契約書をご覧ください。 * * あなたはこのプログラムと共に、GNU 一般公衆利用許諾契約書の複製物を一部 * 受け取ったはずです。もし受け取っていなければ、フリーソフトウェア財団ま * で請求してください(宛先は the Free Software Foundation, Inc., 59 * Temple Place, Suite 330, Boston, MA 02111-1307 USA)。 * *****************************************************************/ $conversion = 'upper'; if(isset($_POST['conversion'])) $conversion = $_POST['conversion']; $text = <<<EOT ケース変換 テキストの文字のケースを大文字、小文字、逆またはランダムに変換する。 このテキストを自分のものと置き換えるだけで、好きな大文字・小文字に変換することができる。 ごゆっくりケース変換を! EOT; if(isset($_POST['text'])) $text = trim(stripslashes($_POST['text'])); ?> <script type="text/javascript"> google_ad_client = "pub-6269511881695171";ngoogle_alternate_ad_url = "http://www.my-tool.com/a120_90.php"; google_ad_width = 728; google_ad_height = 15; google_ad_format = "728x15_0ads_al_s"; google_ad_channel = ""; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "A9501B"; google_color_text = "000000"; google_color_url = "008000"; </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script><br /><br /> <script src="/caseconverter.js"> </script> <noscript> このツールは動くのにJavaScriptが必要。ブラウザーでJavaScriptを使用可能にしてください。 </noscript> <form name="my_tool_form" action="#"> <table> <tr><td><textarea name="text" rows="20" cols="60"><?php echo $text ?></textarea></td></tr> <tr><td> <input type="radio" name="conversion" value="upper" <?php echo $conversion=='upper'?'checked':'' ?>> 大文字に <input type="radio" name="conversion" value="lower" <?php echo $conversion=='lower'?'checked':'' ?>> 小文字に <input type="radio" name="conversion" value="invert" <?php echo $conversion=='invert'?'checked':'' ?>> 逆ケースに <input type="radio" name="conversion" value="random" <?php echo $conversion=='random'?'checked':'' ?>> ランダムに </td></tr> <tr><td><input type="button" value="変換する" onClick="convertCase(this.form.conversion, this.form.text.value)"></td></tr> <tr><td><textarea name="result" rows="20" cols="60" style="border:none" readonly></textarea></td></tr> </table> </form> <br><br> <?php ?>
'caseconverter.js'のソースコードは以下に示す。
<!-- hide script from old browsers /****************************************************************** * * caseconverter.js, Converts case of text either to upper, lower, inverse or random. * Copyright (C) 2006, Bowo Prasetyo * * http://www.my-tool.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation below, * * http://www.gnu.org/licenses/gpl.html#TOC1 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * *****************************************************************/ function convertCase(conversion, text) { var conv, result, i; for (i=0; i<conversion.length; i++) { if (conversion[i].checked) { conv = conversion[i].value; break; } } switch(conv) { case 'upper': result = text.toUpperCase(); break; case 'lower': result = text.toLowerCase(); break; case 'invert': result = text.replace(/([a-z])|([A-Z])/g, function($0,$1,$2){ return ($1)?$0.toUpperCase():$0.toLowerCase(); }); break; default: result = text.replace(/([a-z])|([A-Z])/g, function($0,$1,$2){ return Math.random()>0.5?(($1)?$0.toUpperCase():$0.toLowerCase()):$0; }); break; } window.document.my_tool_form.result.value = result; return true; } // end hiding script from old browsers -->
©2006 my-Tool.com