Qurak

Longest

ใช้งานได้ แตกต่างจากเอกสารอ้างอิง .wl

`Longest[p]` tries the longest split of a sequence pattern first; the default

Longest[p]
{1, 2, 3} /. {Longest[x__], y__} :> {{x}, {y}} → {{1, 2}, {3}}{1, 2, 3} /. {Shortest[x__], y__} :> {{x}, {y}} → {{1}, {2, 3}}{{1, 2, 3} /. {Longest[x_], ___} :> x, MatchQ[{1, 2}, {Longest[__], _}]} → {1, True}

หัวข้อ

ที่เกี่ยวข้อง

ฟังก์ชันทั้งหมด 6300 รายการ · ใช้สิ่งนี้จากไคลเอนต์ MCP