-
-
DevelopPlus.net
ขายสคริปต์เว็บไซต์ลงประกาศสินค้า
-
SiamACT.com
เวปไซต์ที่ให้คุณโฆษณาตนเอง
ขายสคริปต์เว็บไซต์ลงประกาศสินค้า
หากว่าคุณต้องการมีเว็บไซต์ลงประกาศสินค้าเป็นของตนเอง
แต่ว่าคุณไม่มความรู้เรื่องการติดตั้งเว็บ ไม่อยากเช่า hosting
โปรดติดต่อมาหาเรา ทางเราจะให้บริการปัญหาเหล่านี้กับท่าน
เวปไซต์ที่ให้คุณโฆษณาตนเอง
SiamACT.com เป็นเวปไซต์ที่ให้คุณสามารถโปรโมท หรือโฆษณาตนเองได้ตามต้องการ
หากคุณมีวิดีโอเกี่ยวกับตัวคุณอยู่แล้วใน YouTube.com และต้องการโฆษณาให้เป็นที่แพร่หลาย
SiamACT.com จะเป็นสื่อกลางของวิดีโอคลิบเหล่านี้
-
-
-
method:new String ( text );
return type:String
content:ใช้สร้าง object string
example:String str = new String ( "bamboolabcode" );
-
method:new String ( char_array );
return type:String
content:ใช้สร้าง object string จาก char
example:char [] char_text = { 'b', 'a', 'm', 'b', 'o', 'o' };
String str = new String ( char_text );
-
method:new String ( char_array, start, count );
return type:String
content:ใช้สร้าง object string จาก char โดยมีการกำหนด ตำแหน่งเริ่มต้น และจำนวนด้วย
example:char [] char_text = { 'b', 'a', 'm', 'b', 'o', 'o' };
String str = new String ( char_text, 0, 3 );
-
method:new String ( object_strint );
return type:String
content:ใช้สร้าง object string จาก object string
example:String str_1 = new String ( "bamboolabcode" );
String str_2 = new String ( str_1 );
-
method:new String ( byte_ascii_array );
return type:String
content:ใช้สร้าง object string จาก ascii
example:byte [] byte_text = { 66, 65, 76, 66, 78, 78 };
String str = new String ( byte_text );
-
method:new String ( byte_ascii_array, start, count );
return type:String
content:ใช้สร้าง object string จาก ascii โดยมีการกำหนด ตำแหน่งเริ่มต้น และจำนวนด้วย
example:byte [] byte_text = { 66, 65, 76, 66, 78, 78 };
String str = new String ( byte_text, 0, 3 );
-
method:equals ( object_string );
return type:boolean
content:ใช้ในการเปรียบเทียบข้อความ
example:String str_1 = new String ( "bamboo" );
String str_2 = new String ( "labcode" );
if ( str_1.equals( str_2 ) )
{
System.out.println( "string is equals" );
}
-
method:compareTo ( object_string );
return type:int
content:ใช้ในการเปรียบเทียบข้อความ โดยจะค่อยๆเปรียบเทียบทีละตัวอักษร จากรหัส ascii ของข้อความ string
ถ้าคืนค่า 0 กลับมา แสดงว่า string ทั้งสองเท่ากัน
ถ้าคืนค่า ติดลบ กลับมา แสดงว่า ข้อความทางด้านซ้าย มีรหัส ascii ของตัวอักษรที่ทั้งสอง string ไม่เท่ากันตัวแรก มีค่าน้อยกว่า ข้อความทางด้านขวา
ถ้าคืนค่า เลขบวก กลับมา แสดงว่า ข้อความทางด้านซ้าย มีรหัส ascii ของตัวอักษรที่ทั้งสอง string ไม่เท่ากันตัวแรก มีค่ามากกว่า ข้อความทางด้านขวา
example:String str_1 = new String ( "bamboo" );
String str_2 = new String ( "labcode" );
System.out.print ( str_1.compareTo ( str_2 ) );
-
method:concat ( object_string );
return type:String
content:ใช้รวมข้อความ string ( มีค่าเหมือนการใช้ตัวดำเนินการ "+" )
example:String str_1 = new String ( "bamboo" );
String str_2 = new String ( "labcode" );
System.out.println ( str_1 + str_2 );
-
method:substring ( start, stop );
return type:String
content:ใช้ดึงข้อมูลจากข้อความ string โดยเริ่มจากตำแหน่งที่กำหนด จนถึงตำแหน่งที่กำหนด
example:String str = new String ( "bamboolabcode" );
System.out.println ( str.substring ( 6, 12 ) );
-
method:charAt ( index );
return type:char
content:ใช้ดึงข้อมูลจากข้อความ string ณ ตำแหน่งที่กำหนด โดยจะดึงมาเพียง 1 ตัวอักษร
example:String str = new String ( "bamboo" );
char char_text = str.charAt ( 1 );
-
method:getChars ( start, stop, char_array, start_index );
return type:void
content:ใช้ดึงข้อมูลจากข้อความ string ตั้งแต่ตำแหน่งที่กำหนด จนถึงตำแหน่งที่กำหนด
และมาเก็บไว้ที่ตัวแปร char_array โดยเริ่มเก็บเข้าตั้งแต่ start_index ของ char_array
example:char [] char_text = new char[13];
char_text[0] = 'b';
char_text[1] = 'a';
char_text[2] = 'm';
String str = new String ( "bamboolabcode" );
str.getChars( 3, 13, char_text, 3 );
-
method:replace ( old_text, new_text );
return type:void
content:ใช้แทนที่ตัวอักษร
example:String str = new String ( "bambqqlabcqde" );
str.replace ( "q", "o" );
-
method:length ();
return type:int
content:ใช้คืนค่าจำนวนของข้อความ string
example:String str = new String ( "bamboolabcode" );
System.out.print ( str.length() );
-
method:trim ();
return type:void
content:ใช้ตัดช่องว่างทางด้านขวาและด้านซ็ายออกจากข้อความ string
example:String str = new String ( " bamboolabcode " );
str.trim();
-
method:indexOf ( text );
return type:int
content:ใช้ค้นหาข้อความหรือตัวอักษรที่กำหนด เป็นการค้นหาจากหน้าไปหลัง และจะคืนตำแหน่งแรกที่พบ
example:String str = new String ( "bamboolabcode" );
System.out.println ( str.indexOf ( "a" ) );
-
method:indexOf ( text, start );
return type:int
content:ใช้ค้นหาข้อความหรือตัวอักษรที่กำหนด เป็นการค้นหาจากหน้าไปหลัง โดยจะเริ่มค้นหาตั้งแต่ตำแหน่งที่กำหนด
และจะคืนตำแหน่งแรกที่พบ
example:String str = new String ( "bamboolabcode" );
System.out.println ( str.indexOf ( "a", 2 ) );
-
method:lastIndexOf ( text );
return type:int
content:ใช้ค้นหาข้อความหรือตัวอักษรที่กำหนด เป็นการค้นหาจากหลังมาหน้า และจะคืนตำแหน่งแรกที่พบ
example:String str = new String ( "bamboolabcode" );
System.out.println ( str.lastIndexOf ( "a" ) );
-
method:lastIndexOf ( text, start );
return type:int
content:ใช้ค้นหาข้อความหรือตัวอักษรที่กำหนด เป็นการค้นหาจากหลังมาหน้า โดยจะเริ่มค้นหาตั้งแต่ตำแหน่งที่กำหนด
และจะคืนตำแหน่งแรกที่พบ
example:String str = new String ( "bamboolabcode" );
System.out.println ( str.lastIndexOf ( "a", 6 ) );
-
method:toUpperCase ();
return type:void
content:ใช้เปลี่ยนตัวอักษรให้เป็นตัวพิมพ์ใหญ่ทั้งหมด
example:String str = new String ( "BambooLabcode" );
str.toUpperCase();
-
method:toLowerCase ();
return type:void
content:ใช้เปลี่ยนตัวอักษรให้เป็นตัวพิมพ์เล็กทั้งหมด
example:String str = new String ( "BambooLabcode" );
str.toLowerCase();