แม่แบบ:Trim

จากวิกิพีเดีย สารานุกรมเสรี
Documentation icon คู่มือการใช้งานแม่แบบ[ดู] [แก้] [ประวัติ] [ล้างแคช]

This template trims leading and trailing (but not interior) whitespace from a string. The string should be passed as the first unnamed parameter. The parameter must be named |1= if its value contains a = character.

You may substitute this template - that is, if used as {{subst:trim}}, the resulting wikicode is "clean".

Usage

{{trim|text}} = text with any leading or trailing whitespace removed.

Examples

  • "{{trim|abc}}" produces "abc"
  • "{{trim|xyz }}" produces "xyz"
  • "{{trim|abc xyz }}" produces "abc xyz"

Template data

ด้านล่างนี้คือข้อมูลแม่แบบ เอกสารกำกับสำหรับแม่แบบนี้ซึ่งถูกใช้งานโดยเครื่องมือแก้ไขแบบเห็นภาพและเครื่องมืออื่น ๆ

ข้อมูลแม่แบบสำหรับ Trim (ยังไม่มีการตรวจสอบ)

The template trims whitespace from a string.

พารามิเตอร์แม่แบบ[แก้ไขข้อมูลแม่แบบ]

พารามิเตอร์คำอธิบายชนิดสถานะ
String1

The string to be trimmed of whitespace

สตริงจำเป็น

See also