Text.BeforeDelimiter
Text.BeforeDelimiter
Syntax
Text.BeforeDelimiter(
text as text,
delimiter as text,
optional index as any
) as any
Remarks
ส่งกลับส่วนของ text ก่อน delimiter ที่ระบุ ค่าตัวเลข index ที่เป็นตัวเลือกระบุว่าควรพิจารณาการปรากฏของ delimiter ครั้งใด รายการ index ที่เป็นตัวเลือกระบุว่าควรพิจารณาการปรากฏของ delimiter ครั้งใด ตลอดจนระบุว่าการทำดัชนีควรทำตั้งแต่จุดเริ่มต้นหรือจุดสิ้นสุดของการป้อนข้อมูล
Examples
Example #1
รับส่วนของ "111-222-333" ก่อนเครื่องหมายยัติภังค์ (แรก)
Text.BeforeDelimiter("111-222-333", "-")
Result:
"111"
Example #2
รับส่วนของ "111-222-333" ก่อนเครื่องหมายยัติภังค์ที่สอง
Text.BeforeDelimiter("111-222-333", "-", 1)
Result:
"111-222"
Example #3
รับส่วนของ "111-222-333" ก่อนเครื่องหมายยัติภังค์ที่สองจากตอนท้าย
Text.BeforeDelimiter("111-222-333", "-", {1, RelativePosition.FromEnd})
Result:
"111"
Category
Text.Transformations