[Tizen] Add IsSpace in TextAbstraction 80/288880/1
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 23 Feb 2023 12:47:11 +0000 (21:47 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Fri, 24 Feb 2023 04:50:21 +0000 (13:50 +0900)
Change-Id: Ic615aa2c20e22bfa013f81fa28fa5a393ea946b5
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
dali/devel-api/text-abstraction/script.cpp
dali/devel-api/text-abstraction/script.h

index ef4ecff..bac6f8d 100644 (file)
@@ -26,6 +26,7 @@ namespace
 {
 //TODO: Move the below defined characters to "defined-characters.h"
 constexpr unsigned int WHITE_SPACE_THRESHOLD = 0x21;   ///< All characters below 0x21 are considered white spaces.
+constexpr unsigned int CHAR_SPACE            = 0x20;   ///< Space.
 constexpr unsigned int CHAR_LF               = 0x000A; ///< NL Line feed, new line.
 constexpr unsigned int CHAR_VT               = 0x000B; ///< Vertical tab.
 constexpr unsigned int CHAR_FF               = 0x000C; ///< NP Form feed, new page.
@@ -993,6 +994,11 @@ bool IsWhiteSpace(Character character)
   return character < WHITE_SPACE_THRESHOLD;
 }
 
+bool IsSpace(Character character)
+{
+  return CHAR_SPACE == character;
+}
+
 bool IsNewParagraph(Character character)
 {
   return ((CHAR_LF == character) ||
index 71d3087..f79d8ec 100644 (file)
@@ -214,6 +214,15 @@ DALI_ADAPTOR_API Script GetCharacterScript(Character character);
 DALI_ADAPTOR_API bool IsWhiteSpace(Character character);
 
 /**
+ * @brief Whether the character is a space.
+ *
+ * @param[in] character The character.
+ *
+ * @return @e true if the character is a space.
+ */
+DALI_ADAPTOR_API bool IsSpace(Character character);
+
+/**
  * @brief Whether the character is a new paragraph character.
  *
  * @param[in] character The character.