DisplayTextFormatterSupport

DisplayTextFormatterSupport

Overview

DisplayTextFormatterSupport là một lớp trong Aspose.Cells FOSS cho C++.

Phương pháp hỗ trợ nội bộ cho định dạng văn bản hiển thị số, văn Bản và giá trị ngày/giờ.

Khóa học này cung cấp 17 phương pháp để làm việc với các đối tượng DisplayTextFormatterSupport trong các chương trình C++. Các phương pháp có sẵn bao gồm: ContainsNumericPlaceholder, ConvertToDouble, DisplayTextFormatterSupport, EvaluateCondition, ExpandSectionPattern, GetAbsoluteNumericValue, IsNumericValue, ParseSections, SanitizeNumericSection, SelectDateTimeSection, SelectNumericSection, SelectTextSection,Và 5 phương pháp bổ sung. Tất cả các thành viên công cộng đều có thể truy cập vào bất kỳ ứng dụng C++ nào sau khi cài đặt Aspose.Cells FOSS cho gói C ++.

Methods

SignatureDescription
DisplayTextFormatterSupport()Hãy gọi DisplayTextFormatterSupport trên trường hợp này DisplayTextFormatterSupport.
SelectNumericSection(sections: std::vector<DisplayFormatSectionInfo>, numericValue: double, useAbsoluteValue: bool)std::optional<DisplayFormatSectionInfo>Chọn phần số thích hợp từ mã định dạng parsed.Tôi quay lại std::nullopt khi các phần trống rỗng.
SelectTextSection(sections: std::vector<DisplayFormatSectionInfo>)std::optional<DisplayFormatSectionInfo>Chọn phần văn bản (phần thứ tư, hoặc đầu tiên chứa ‘@’). Trả lại td::nullopt nếu không tìm thấy phần Văn bản.
SelectDateTimeSection(sections: std::vector<DisplayFormatSectionInfo>)std::optional<DisplayFormatSectionInfo>Chọn phần ngày/giờ không trống đầu tiên (từ ba phần đầu).Tôi trả về:nullopt nếu tất cả đều là trắng.
ParseSections(formatCode: std::string_view)std::vector<DisplayFormatSectionInfo>Chia một mã định dạng vào mô tả phần.
SplitSections(formatCode: std::string_view)std::vector<std::string>Chia một mã định dạng trên các semicolons không được ghi, không thoát ra.
TryParseSectionCondition(section: std::string_view, conditionOperator: std::string, conditionValue: double)boolCố gắng phân chia một điều kiện (operator + giá trị) từ một dòng phần.
TryParseConditionToken(token: std::string_view, conditionOperator: std::string, conditionValue: double)boolCố gắng để phân loại một token điều kiện như “>=10”.
EvaluateCondition(conditionOperator: std::string_view, numericValue: double, conditionValue: double)bool- Tính toán so sánh giữa số và điều kiện.
ShouldUseAbsoluteValue(section: std::string_view, numericValue: double)boolNó xác định xem giá trị tuyệt đối của một số tiêu cực có nên được sử dụng khi định dạng (ví dụ, mô hình không có dấu ‘-’ rõ ràng).
SanitizeNumericSection(section: std::string_view)std::stringRút các mũi tên hướng dẫn, trốn thoát đề xuất và ký tự vị trí từ một phần số, trả về dòng được làm sạch (được vẽ).
StripDirectiveBrackets(section: std::string_view, preserveElapsedTokens: bool)std::stringXóa token hướng dẫn bị cắn từ một dòng phần.
ContainsNumericPlaceholder(pattern: std::string_view)boolTrở lại đúng nếu mẫu chứa bất kỳ nhân vật vị trí số nào.
ExpandSectionPattern(pattern: std::string_view, valueText: std::string_view, replaceTextPlaceholder: bool)std::stringTăng mô hình phần bằng cách thay thế các vị trí văn bản và loại bỏ sự thoát khỏi định dạng.
IsNumericValue(value: CellValue)boolTrở lại đúng nếu CellValue có một loại số (int hoặc double).
ConvertToDouble(value: CellValue)doubleChuyển đổi một CellValue số sang gấp đôi. Throws std::invalid_argument nếu giá trị không phải là số.
GetAbsoluteNumericValue(value: CellValue)CellValueTrả lại giá trị số tuyệt đối. giá cả không số được trả về không thay đổi.

See Also

 Tiếng Việt