Text.Replace ใช้สำหรับแทนที่ทุกส่วนของข้อความเก่าในข้อความหลักด้วยข้อความใหม่ เป็น Case Sensitive และแทนที่ทีละครั้งที่เจอในข้อความทั้งหมด
Syntax
Text.Replace(text as nullable text, old as text, new as text) as nullable text
Text.Replace ใช้สำหรับแทนที่ทุกส่วนของข้อความเก่าในข้อความหลักด้วยข้อความใหม่ เป็น Case Sensitive และแทนที่ทีละครั้งที่เจอในข้อความทั้งหมด
Text.Replace(text as nullable text, old as text, new as text) as nullable text
Text.ReplaceRange ใช้สำหรับแทนที่อักขระในช่วงที่กำหนดด้วยข้อความใหม่ สามารถใช้ลบหรือแทรกข้อความ
Text.ReplaceRange(text as nullable text, offset as number, count as number, newText as text) as nullable text
กลับด้านข้อความ (Reverse String)
Text.Reverse(text as nullable text) as nullable text
Text.Select จะคืนค่าข้อความใหม่ที่ประกอบด้วยตัวอักษรที่อยู่ใน selectChars เท่านั้น อักขระใดที่ไม่อยู่ในรายการนี้จะถูกลบออกไป มีประโยชน์มากในการ Clean Data
Text.Select(text as nullable text, selectChars as any) as nullable text
Text.Split(text, separator) ใช้แยกข้อความเป็น List โดยอิงตามตัวคั่น (delimiter) ที่ระบุ สามารถใช้ตัวคั่นเพียงตัวเดียวหรือหลายตัวอักษร เช่น "|" หรือ ", the " ผลลัพธ์คืนค่าเป็น List ของข้อความ
Text.Split(text as text, separator as text) as list
Text.SplitAny ใช้สำหรับแยกข้อความด้วยอักขระใดๆ ในรายการ แตกต่างจาก Text.Split ที่ใช้สตริงตัวคั่นเดียว
Text.SplitAny(text as text, separators as text) as list
Text.Start ดึงอักขระจำนวนที่กำหนดจากตัวแรกของสตริงข้อความ ใช้สำหรับดึงชื่อย่อ รหัส หรือส่วนแรกของข้อมูล
Text.Start(text as nullable text, count as number) as nullable text
Text.StartsWith ตรวจสอบว่าข้อความหลักขึ้นต้นด้วยข้อความย่อยที่กำหนดหรือไม่ โดยคืนค่า true หรือ false สามารถระบุ Comparer เพื่อเลือกว่าจะให้ตรวจสอบแบบ Case Sensitive (ไว) หรือ Case Insensitive (ไม่ไว) ได้
Text.StartsWith(text as nullable text, substring as text, optional comparer as nullable function) as nullable logical
Text.ToBinary ใช้สำหรับแปลงข้อความเป็นค่า Binary โดยใช้การเข้ารหัส UTF-8 เป็นค่าเริ่มต้น รองรับการเข้ารหัส UTF-16 และ ASCII
Text.ToBinary(text as nullable text, optional encoding as nullable number, optional includeByteOrderMark as nullable logical) as nullable binary
Text.ToList จะแยกข้อความหลักออกเป็น List ของ Text String โดยแต่ละสมาชิกใน List จะเป็นตัวอักษร 1 ตัว (รวมถึงช่องว่างและอักขระพิเศษ) ตามลำดับที่ปรากฏในข้อความต้นฉบับ
Text.ToList(text as text) as list
Text.Trim ลบอักขระที่ระบุออกจากต้นและท้ายของข้อความ ค่าเริ่มต้นจะลบแค่ช่องว่าง
= Text.Trim(text as nullable text, optional trim as any) as nullable text
Text.TrimEnd จะลบช่องว่างหรืออักขระส่วนเกินที่อยู่ด้านขวาสุดของข้อความออก สามารถระบุ List ของอักขระที่ต้องการลบได้ เป็นเครื่องมือที่ดีในการทำความสะอาดข้อมูลที่ Copy มาแล้วมี Space หรือสัญลักษณ์ต่อท้ายเกินมา
Text.TrimEnd(text as nullable text, optional trimChars as nullable list) as nullable text
Text.TrimStart จะลบช่องว่างหรืออักขระส่วนเกินที่อยู่ด้านซ้ายสุดของข้อความออก สามารถระบุ List ของอักขระที่ต้องการลบได้ ทำให้เป็นเครื่องมือที่มีประโยชน์ในการทำความสะอาดข้อมูลที่ Copy มาแล้วมี Space หรือสัญลักษณ์นำหน้าเกินมา
Text.TrimStart(text as nullable text, optional trimChars as nullable list) as nullable text
Text.Upper แปลงอักขระทั้งหมดในข้อความเป็นตัวอักษรใหญ่ โดยรองรับการตั้งค่า culture ต่างๆ เพื่อจัดการการแปลงที่ถูกต้องตามภาษา
Text.Upper(text as nullable text, optional culture as nullable text) as nullable text
ระบุประเภทของการเข้ารหัสข้อความ (Text Encoding)
Time.EndOfHour ใช้สำหรับการประมวลผล
time_endofhour(value as any) as any
Time.From แปลงค่าต่างๆ เช่น ข้อความ ตัวเลข DateTime เป็นค่าเวลา ฟังก์ชันนี้มีประโยชน์เมื่อต้องการแปลงข้อมูลเวลาจากรูปแบบข้อความหรือรูปแบบอื่นๆ มาเป็นค่าเวลาที่ถูกต้อง
Time.From(value as any, optional culture as nullable text) as nullable time
Time.FromText ใช้สำหรับการประมวลผล
time_fromtext(value as any) as any
Time.Hour ใช้สำหรับดึงค่าชั่วโมง (0-23) จากค่า time, datetime หรือ datetimezone
= Time.Hour(dateTime as any) as nullable number
Time.Minute ใช้สำหรับการประมวลผล
time_minute(value as any) as any
Time.Second ใช้สำหรับการประมวลผล
time_second(value as any) as any
Time.StartOfHour ใช้สำหรับการประมวลผล
time_startofhour(value as any) as any
Time.ToRecord ใช้สำหรับการประมวลผล
time_torecord(value as any) as any
Time.ToText ใช้สำหรับการประมวลผล
time_totext(value as any) as any
ระบุระดับของการ Trace
Type.AddTableKey ใช้สำหรับการประมวลผล
type_addtablekey(value as any) as any
Type.ClosedRecord ใช้สำหรับการประมวลผล
type_closedrecord(value as any) as any
Type.Facets ใช้สำหรับการประมวลผล
type_facets(value as any) as any
Type.ForFunction ใช้สำหรับการประมวลผล
type_forfunction(value as any) as any
Type.ForRecord ใช้สำหรับการประมวลผล
type_forrecord(value as any) as any
Type.FunctionParameters ใช้สำหรับการประมวลผล
type_functionparameters(value as any) as any
Type.FunctionRequiredParameters ใช้สำหรับการประมวลผล
type_functionrequiredparameters(value as any) as any
Type.FunctionReturn ใช้สำหรับการประมวลผล
type_functionreturn(value as any) as any
Type.IsNullable ใช้สำหรับการประมวลผล
type_isnullable(value as any) as any
Type.IsOpenRecord ใช้สำหรับการประมวลผล
type_isopenrecord(value as any) as any
Type.ListItem ใช้สำหรับการประมวลผล
type_listitem(value as any) as any
Type.NonNullable ใช้สำหรับการประมวลผล
type_nonnullable(value as any) as any
Type.OpenRecord ใช้สำหรับการประมวลผล
type_openrecord(value as any) as any
Type.RecordFields ใช้สำหรับการประมวลผล
type_recordfields(value as any) as any
Type.ReplaceFacets ใช้สำหรับการประมวลผล
type_replacefacets(value as any) as any
Type.ReplaceTableKeys ใช้สำหรับการประมวลผล
type_replacetablekeys(value as any) as any
Type.ReplaceTablePartitionKey ใช้สำหรับการประมวลผล
type_replacetablepartitionkey(value as any) as any
Type.TableColumn ใช้สำหรับการประมวลผล
type_tablecolumn(value as any) as any
Type.TableKeys ใช้สำหรับการประมวลผล
type_tablekeys(value as any) as any
Type.TableRow ใช้สำหรับการประมวลผล
type_tablerow(value as any) as any
Type.TableSchema ใช้สำหรับการประมวลผล
type_tableschema(value as any) as any
Type.Union ใช้สำหรับการประมวลผล
type_union(value as any) as any
Uri.BuildQueryString สร้าง URL Query String จากรายการหรือแถวข้อมูล มีประโยชน์เมื่อต้องสร้าง URL พารามิเตอร์สำหรับการเรียก API
Uri.BuildQueryString(query as record) as text
Uri.Combine ใช้สำหรับการประมวลผล
uri_combine(value as any) as any