DisplayTextFormatterSupport

DisplayTextFormatterSupport

Overview

DisplayTextFormatterSupport เป็นคลาสใน Aspose.Cells FOSS สําหรับ C++.

วิธีช่วยภายในสําหรับการออกแบบข้อความในการแสดงของค่าตัวเลข, ข้อความ และวัน/เวลา.

หมวดนี้ให้ 17 วิธีในการทํางานกับวัตถุ DisplayTextFormatterSupport ในโปรแกรม C++. วิธีการที่ใช้ได้แก่: ContainsNumericPlaceholder, ConvertToDouble, DisplayTextFormatterSupport, EvaluateCondition, ExpandSectionPattern, GetAbsoluteNumericValue, IsNumericValue, ParseSections, SanitizeNumericSection, SelectDateTimeSection, SelectNumericSection, SelectTextSection,และ 5 วิธีเพิ่มเติม. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน C++ ใดก็ได้หลังจากติดตั้งแพ็คเกจ Aspose.Cells FOSS for C++.

Methods

SignatureDescription
DisplayTextFormatterSupport()เรียก DisplayTextFormatterSupport ในตัวอย่างนี้ DisplayTextFormatterSupport.
SelectNumericSection(sections: std::vector<DisplayFormatSectionInfo>, numericValue: double, useAbsoluteValue: bool)std::optional<DisplayFormatSectionInfo>เลือกส่วนตัวเลขที่เหมาะสมจากรหัสรูปแบบการพาร์ส ส่งคืน std:: nullopt เมื่อส่วนว่าง.
SelectTextSection(sections: std::vector<DisplayFormatSectionInfo>)std::optional<DisplayFormatSectionInfo>เลือกส่วนข้อความ (ส่วนที่สี่, หรือแรกที่มี ‘@’). กลับ std:: nullopt หากไม่มีส่วนบทความพบ.
SelectDateTimeSection(sections: std::vector<DisplayFormatSectionInfo>)std::optional<DisplayFormatSectionInfo>เลือกส่วนวัน/เวลาที่ไม่ว่างแรก (ในสามครั้งแรก) กลับ std::nullopt หากทั้งหมดเป็นเปล่า.
ParseSections(formatCode: std::string_view)std::vector<DisplayFormatSectionInfo>การพาราส์คอดรูปแบบเป็นตัวอธิบายส่วน.
SplitSections(formatCode: std::string_view)std::vector<std::string>แบ่งรหัสรูปแบบเป็นตัวเลขสองจุดที่ไม่ได้อ้างอิงและไม่ถูกหลีกเลี่ยง.
TryParseSectionCondition(section: std::string_view, conditionOperator: std::string, conditionValue: double)boolการพยายามพารสสถานะ (ตัวประกอบ + ค่า) จากร่องส่วน.
TryParseConditionToken(token: std::string_view, conditionOperator: std::string, conditionValue: double)boolพยายามพารัสตัวตราเงื่อนไข เช่น “>=10”.
EvaluateCondition(conditionOperator: std::string_view, numericValue: double, conditionValue: double)boolประเมินการเปรียบเทียบระหว่าง numericValue และ conditionValue.
ShouldUseAbsoluteValue(section: std::string_view, numericValue: double)boolการกําหนดว่าค่าสมบูรณ์ของจํานวนลบควรใช้ในการจัดรูป (คือ รูปแบบไม่มีเครื่องหมาย “-”) โดยชัดเจนหรือไม่.
SanitizeNumericSection(section: std::string_view)std::stringสลัดขาเข็มคําสั่ง, การหลีกเลี่ยงการอ้างอิง และตัวอักษรที่เก็บตําแหน่งจากส่วนจํานวน, ย้อน string ที่ทําความสะอาด (ตัดริม).
StripDirectiveBrackets(section: std::string_view, preserveElapsedTokens: bool)std::stringลบ token คําสั่งในครากจากสายส่วน.
ContainsNumericPlaceholder(pattern: std::string_view)boolกลับ true หากรูปแบบมีตัวอักษรที่ถือตําแหน่งเลขใด ๆ.
ExpandSectionPattern(pattern: std::string_view, valueText: std::string_view, replaceTextPlaceholder: bool)std::stringขยายรูปแบบส่วนโดยการเปลี่ยนตัวเก็บตําแหน่งข้อความและลบช่องทางหนีในการจัดรูป.
IsNumericValue(value: CellValue)boolกลับ true หาก CellValue มีตัวเลข (int หรือ double).
ConvertToDouble(value: CellValue)doubleเปลี่ยนค่าจํานวน CellValue เป็น double. วางการโต้แย้ง std::invalid_argument หากมูลค่าไม่ได้เป็นตัวเลข.
GetAbsoluteNumericValue(value: CellValue)CellValueกลับค่าตัวเลขที่สมบูรณ์ ค่าที่ไม่ใช่จํานวนถูกส่งกลับมาโดยไม่เปลี่ยนแปลง.

See Also

 ภาษาไทย