DisplayTextFormatterSupport

DisplayTextFormatterSupport

개요

DisplayTextFormatterSupport은 Aspose.Cells FOSS for C++에 포함된 클래스입니다.

숫자, 텍스트 및 날짜/시간 값의 표시 텍스트 형식을 위한 내부 도우미 메서드.

이 클래스는 C++ 프로그램에서 DisplayTextFormatterSupport 객체를 다루기 위한 17개의 메서드를 제공합니다. 사용 가능한 메서드에는 ContainsNumericPlaceholder, ConvertToDouble, DisplayTextFormatterSupport, EvaluateCondition, ExpandSectionPattern, GetAbsoluteNumericValue, IsNumericValue, ParseSections, SanitizeNumericSection, SelectDateTimeSection, SelectNumericSection, SelectTextSection 및 추가 5개의 메서드가 포함됩니다. 모든 public 멤버는 Aspose.Cells FOSS for C++ 패키지를 설치한 후 모든 C++ 애플리케이션에서 접근할 수 있습니다.

메서드

시그니처설명
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) → boolnumericValue와 conditionValue 사이의 비교를 평가합니다.
ShouldUseAbsoluteValue(section: std::string_view, numericValue: double) → bool음수의 절대값을 포맷할 때 사용해야 하는지 여부를 결정합니다(예: 패턴에 명시적인 ‘-’ 기호가 없을 경우).
SanitizeNumericSection(section: std::string_view) → std::string숫자 섹션에서 지시자 대괄호, 인용 부호 이스케이프 및 자리 표시자 문자를 제거하고 정리된 문자열(가장자리 트림됨)을 반환합니다.
StripDirectiveBrackets(section: std::string_view, preserveElapsedTokens: bool) → std::string섹션 문자열에서 대괄호로 묶인 지시자 토큰을 제거합니다.
ContainsNumericPlaceholder(pattern: std::string_view) → bool패턴에 숫자 자리 표시자 문자가 포함되어 있으면 true를 반환합니다.
ExpandSectionPattern(pattern: std::string_view, valueText: std::string_view, replaceTextPlaceholder: bool) → std::string텍스트 자리 표시자를 교체하고 포맷 이스케이프를 제거하여 섹션 패턴을 확장합니다.
IsNumericValue(value: CellValue) → boolCellValue 가 숫자 타입(int 또는 double)을 가지고 있으면 true를 반환합니다.
ConvertToDouble(value: CellValue) → double숫자형 CellValue을 double로 변환합니다. 값이 숫자가 아니면 std::invalid_argument을 발생시킵니다.
GetAbsoluteNumericValue(value: CellValue) → CellValue절대 숫자 값을 반환합니다. 숫자가 아닌 값은 그대로 반환됩니다.

참조

 한국어