{"id":8822,"date":"2026-11-20T13:23:49","date_gmt":"2026-11-20T10:23:49","guid":{"rendered":"https:\/\/help.bothelp.io\/formula-rabota-s-tekstom\/"},"modified":"2026-11-20T13:54:14","modified_gmt":"2026-11-20T10:54:14","slug":"formula-rabota-s-tekstom","status":"publish","type":"post","link":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/","title":{"rendered":"Formula: Working with Text"},"content":{"rendered":"<p>The functions in this group work with text: they cut, split, join and change letter case.<\/p>\r\n<p><strong>Where it helps:<\/strong><\/p>\r\n<ul>\r\n<li>address the subscriber by name with a capital letter;<\/li>\r\n<li>split a full name or an address into parts;<\/li>\r\n<li>build a message from several fields;<\/li>\r\n<li>check the length of an answer.<\/li>\r\n<\/ul>\r\n<h2>Functions<\/h2>\r\n\n<table id=\"tablepress-7\" class=\"tablepress tablepress-id-7\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\"><strong>Function<\/strong><\/th><th class=\"column-2\"><strong>Description<\/strong><\/th><th class=\"column-3\"><strong>Example<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">len(text)<\/td><td class=\"column-2\">Returns the number of characters in a string.<\/td><td class=\"column-3\">len(\"\u041f\u0440\u0438\u0432\u0435\u0442\") \u2192 6<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">substring(str, n1, n2)<\/td><td class=\"column-2\">Cuts the string: n1 \u2014 how many characters to skip from the left; n2 \u2014 a negative number, how many characters to cut from the right. n2 is optional.<\/td><td class=\"column-3\">substring(\"BotHelp\", 3) \u2192 \"Help\"<br>substring(\"BotHelp\", 3, -2) \u2192 \"He\"<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">upper(text)<\/td><td class=\"column-2\">Converts text to uppercase.<\/td><td class=\"column-3\">upper(\"\u043f\u0440\u0438\u0432\u0435\u0442\") \u2192 \"\u041f\u0420\u0418\u0412\u0415\u0422\"<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">lower(text)<\/td><td class=\"column-2\">Converts text to lowercase.<\/td><td class=\"column-3\">lower(\"HELLO\") \u2192 \"hello\"<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">split(text, separator, index)<\/td><td class=\"column-2\">Splits the string by a separator and returns the part with the given number (starting from 0). If the number isn't set, returns the first part. If there's no such part, returns an empty string.<\/td><td class=\"column-3\">split(\"John Smith\", \" \") \u2192 \"John\"<br>split(\"John Smith\", \" \", 1) \u2192 \"Smith\"<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">match(text, pattern, ignore_case=True)<\/td><td class=\"column-2\">Checks if the string contains the specified word (by pattern).<\/td><td class=\"column-3\">match(\"\u043a\u0443\u043f\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440\", \"\u043a\u0443\u043f\u0438\u0442\u044c\") \u2192 True<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-1\">split_list(text, separator, max_parts)<\/td><td class=\"column-2\">Splits the string by a separator and returns all parts as a list. max_parts limits the number of parts (optional).<\/td><td class=\"column-3\">split_list(\"course, book\", \", \") \u2192 [\"course\", \"book\"]<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-1\">strip(text)<\/td><td class=\"column-2\">Removes spaces at the start and end of a string.<\/td><td class=\"column-3\">strip(\"  hello \") \u2192 \"hello\"<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-1\">capitalize(text)<\/td><td class=\"column-2\">Makes the first letter of the string uppercase and the rest lowercase.<\/td><td class=\"column-3\">capitalize(\"jOHN\") \u2192 \"John\"<\/td>\n<\/tr>\n<tr class=\"row-11\">\n\t<td class=\"column-1\">title(text)<\/td><td class=\"column-2\">Makes the first letter of each word uppercase and the rest lowercase.<\/td><td class=\"column-3\">title(\"john smith\") \u2192 \"John Smith\"<\/td>\n<\/tr>\n<tr class=\"row-12\">\n\t<td class=\"column-1\">contains(text, pattern, ignore_case)<\/td><td class=\"column-2\">Checks whether the string contains the pattern. Case-sensitive by default; pass True as the third argument to ignore case.<\/td><td class=\"column-3\">contains(\"I want the course\", \"course\") \u2192 True<\/td>\n<\/tr>\n<tr class=\"row-13\">\n\t<td class=\"column-1\">startswith(text, prefix)<\/td><td class=\"column-2\">Checks whether the string starts with the given text.<\/td><td class=\"column-3\">startswith(\"+79001234567\", \"+7\") \u2192 True<\/td>\n<\/tr>\n<tr class=\"row-14\">\n\t<td class=\"column-1\">endswith(text, suffix)<\/td><td class=\"column-2\">Checks whether the string ends with the given text.<\/td><td class=\"column-3\">endswith(\"mail@gmail.com\", \"gmail.com\") \u2192 True<\/td>\n<\/tr>\n<tr class=\"row-15\">\n\t<td class=\"column-1\">replace(text, old, new, count)<\/td><td class=\"column-2\">Replaces part of the string with another. By default replaces all matches; count limits the number of replacements (optional).<\/td><td class=\"column-3\">replace(\"8-900-123\", \"-\", \"\") \u2192 \"8900123\"<\/td>\n<\/tr>\n<tr class=\"row-16\">\n\t<td class=\"column-1\">normalize_phone(phone)<\/td><td class=\"column-2\">Leaves only digits in a phone number. An 11-digit number starting with 8 is converted to start with 7.<\/td><td class=\"column-3\">normalize_phone(\"8 (978) 999-99-99\") \u2192 \"79789999999\"<\/td>\n<\/tr>\n<tr class=\"row-17\">\n\t<td class=\"column-1\">tg_escape(text)<\/td><td class=\"column-2\">Adds a backslash before Telegram formatting characters (_ * [ ] ( ) ~ ` > # + - = | { } . !) so the text is shown as is.<\/td><td class=\"column-3\">tg_escape(\"1.5*2\") \u2192 \"1\\.5\\*2\"<\/td>\n<\/tr>\n<tr class=\"row-18\">\n\t<td class=\"column-1\">findall(pattern, text, index)<\/td><td class=\"column-2\">Finds all parts of the text that match a regular expression and returns them as a list. With index, returns one match by number (starting from 0), or an empty string if there's none.<\/td><td class=\"column-3\">findall(\"\\d+\", \"Order 123 and 456\") \u2192 [\"123\", \"456\"]<br>findall(\"\\d+\", \"Order 123 and 456\", 1) \u2192 \"456\"<\/td>\n<\/tr>\n<tr class=\"row-19\">\n\t<td class=\"column-1\">similar(text1, text2, threshold)<\/td><td class=\"column-2\">Compares strings allowing for typos, ignoring case and spaces at the edges. Returns True if the similarity is at least threshold: from 0 to 1, 0.7 by default.<\/td><td class=\"column-3\">similar(\"Moscow\", \"Moskow\") \u2192 True<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-7 from cache -->\r\n<h2>Dates in string functions<\/h2>\r\n<p>Variables of the &#8220;Date&#8221; and &#8220;Date and time&#8221; types are stored in the internal format <code>YYYY-MM-DD<\/code>. For example, the input <code>11.11.2011<\/code> is stored as <code>\"2011-11-11\"<\/code>. That&#8217;s why <code>substring()<\/code> cuts a date according to this format.<\/p>\r\n<p>To get the expected values:<\/p>\r\n<p><strong>Option 1: convert the date to the familiar format<\/strong><\/p>\r\n<p><code>date = format_date(client.birth_date, \"%d.%m.%Y\")<\/code><\/p>\r\n<p><strong>Option 2: cut the date taking the <code>YYYY-MM-DD<\/code> format into account<\/strong><\/p>\r\n<p>Use the positions in the string <code>\"2011-11-11\"<\/code>.<\/p>\r\n<h2>Example: check the answer length<\/h2>\r\n<p>Count the characters in the answer with <strong>len<\/strong>. Variables with the required names must be created <strong>in advance<\/strong>.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6480\" src=\"https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-1024x376.png\" alt=\"\" width=\"1129\" height=\"414\" srcset=\"https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-1024x376.png 1024w, https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-300x110.png 300w, https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-768x282.png 768w, https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-1536x563.png 1536w, https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-2048x751.png 2048w\" sizes=\"auto, (max-width: 1129px) 100vw, 1129px\" \/><\/p>\r\n\r\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\"># Count the characters\r\nclient.answer_count = len(client.answer)\r\n\r\n# Check that there are 10 or more characters: if yes, answer_valid gets 1, if not \u2014 0\r\nclient.answer_valid = len(client.answer) &gt;= 10<\/pre><\/div>\r\n\r\n\r\n<h2>Example: a name with a capital letter<\/h2>\r\n<p>The subscriber wrote &#8221;  john smith&#8221;. Take the first word and bring it to a proper form.<\/p>\r\n\r\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\">client.first_name = title(split(strip(client.full_name), &quot; &quot;))<\/pre><\/div>\r\n\r\n\r\n<p><code>first_name<\/code> gets <code>John<\/code>.<\/p>\r\n<h2>Example: life number<\/h2>\r\n<p>Let&#8217;s calculate the life number \u2014 the sum of all digits of the birth date. The subscriber&#8217;s date is passed in the <strong>birth_date<\/strong> variable.<\/p>\r\n<ul>\r\n<li>In line 1, convert the date to <code>DD.MM.YYYY<\/code>, because inside BotHelp the date is stored as <code>\"2011-11-11\"<\/code>.<\/li>\r\n<li>In lines 3 to 10, use <strong>substring<\/strong> to take each digit and save it to a local variable.<\/li>\r\n<li>In line 12, add the digits up into <strong>life_number<\/strong> to show the subscriber.<\/li>\r\n<\/ul>\r\n\r\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\">date = format_date(client.birth_date, &quot;%d.%m.%Y&quot;)\r\n\r\nd1 = int(substring(date, 0, -9))\r\nd2 = int(substring(date, 1, -8))\r\nd3 = int(substring(date, 3, -6))\r\nd4 = int(substring(date, 4, -5))\r\nd5 = int(substring(date, 6, -3))\r\nd6 = int(substring(date, 7, -2))\r\nd7 = int(substring(date, 8, -1))\r\nd8 = int(substring(date, 9, 0))\r\n\r\nclient.life_number = d1+d2+d3+d4+d5+d6+d7+d8<\/pre><\/div>\r\n\r\n\r\n<h2>Line break (<code>\\n<\/code>)<\/h2>\r\n<p>The <code>\\n<\/code> character adds a line break inside text.<\/p>\r\n\r\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\">client.text = &quot;First line\\nSecond line&quot;<\/pre><\/div>\r\n\r\n\r\n<p>Result:<\/p>\r\n<p><code>First line<\/code><br \/><code>Second line<\/code><\/p>\r\n<h2>Joining strings<\/h2>\r\n<p><strong>1. Joining with the <code>+<\/code> operator<\/strong><\/p>\r\n<p>Combines several values into one string and saves the result to a variable. Use it to build a final message, an ID or a signature.<\/p>\r\n<ol>\r\n<li>Only strings can be joined with <code>+<\/code>. Convert values of other types to a string first: <code>str(client.A)<\/code>.<\/li>\r\n<li>Join the values with <code>+<\/code>.<\/li>\r\n<li>Assign the result to a variable.<\/li>\r\n<\/ol>\r\n\r\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\">client.result = &quot;Order #&quot; + client.order_id + &quot; accepted&quot;<\/pre><\/div>\r\n\r\n\r\n<p>What <strong>client.result<\/strong> contains: <code>Order #12345 accepted<\/code><\/p>\r\n<p><strong>Important:<\/strong> the <code>+<\/code> operator <strong>creates a new value<\/strong>. If the code runs again, the previous value is <strong>overwritten<\/strong>.<\/p>\r\n<p><strong>2. Adding text with the <code>+=<\/code> operator<\/strong><\/p>\r\n<p>Gradually appends text to the end of a string without erasing the previous value. Use it for logs, message history and collecting comments.<\/p>\r\n\r\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\">client.log = &quot;First message&quot;\r\nclient.log += &quot;\\nSecond message&quot;\r\nclient.log += &quot;\\nThird message&quot;<\/pre><\/div>\r\n\r\n\r\n<p>What <strong>client.log<\/strong> contains:<\/p>\r\n<p><code>First message<\/code><br \/><code>Second message<\/code><br \/><code>Third message<\/code><\/p>\r\n<p><strong>Important:<\/strong> the <code>+=<\/code> operator <strong>doesn&#8217;t replace the value<\/strong>, it adds the new one to the end of the string. Use <code>\\n<\/code> to separate lines.<\/p>\r\n<p>For example, let&#8217;s collect the history of the subscriber&#8217;s inputs in one variable and add the time to each entry:<\/p>\r\n<ol>\r\n<li>Save the current time to a local variable with <code>get_current_time()<\/code>.<\/li>\r\n<li>Join the order number, a line break and the time. Only strings can be joined \u2014 convert other types with <code>str()<\/code>.<\/li>\r\n<li>Append the entry to the end of the log with <code>+=<\/code>, separating entries with an empty line.<\/li>\r\n<\/ol>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6773\" src=\"https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-3-1024x209.png\" alt=\"\" width=\"1103\" height=\"225\" srcset=\"https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-3-1024x209.png 1024w, https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-3-300x61.png 300w, https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-3-768x157.png 768w, https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-3-1536x314.png 1536w, https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-3-2048x418.png 2048w\" sizes=\"auto, (max-width: 1103px) 100vw, 1103px\" \/><\/p>\r\n\r\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\">A = get_current_time()\r\nclient.check += ('\\n' + '\\n' + client.number_order + '\\n' + ' \u25f7 ' + A)<\/pre><\/div>\r\n\r\n\r\n<p>To bring a phone number to one format, accept an answer with a typo or find a fragment by a pattern, see <a href=\"https:\/\/help.bothelp.io\/en\/formula-checking-subscriber-answers\/\">Formula: Checking Subscriber Answers<\/a>.<\/p>\r\n<hr \/>\r\n<p>If you did not find the answer to your question, feel free to contact us in the chat inside your dashboard, message us on Telegram at <a href=\"https:\/\/t.me\/BotHelpSupportBot\" target=\"_blank\" rel=\"noopener\"><strong>@BotHelpSupportBot<\/strong><\/a>, or email us at <a href=\"mailto:hello@bothelp.io\" target=\"_blank\" rel=\"noopener\"><strong>hello@bothelp.io<\/strong><\/a>.<\/p>\r\n<p>Enjoy the full functionality of the BotHelp platform for creating broadcasts, automated funnels, and chatbots \u2014 free for 14 days.<\/p>\r\n<p><a href=\"https:\/\/bothelp.io\/?utm_source=bz&#038;utm_medium=footer&#038;utm_campaign=16881\"><strong>Get 14 Days Free<\/strong><\/a><\/p>\r\n\t\t\t<div id=\"daexthefu-container\"\r\n\t\t\t\tclass=\"daexthefu-container daexthefu-layout-side-by-side daexthefu-alignment-left\"\r\n\t\t\t\tdata-post-id=\"8822\">\r\n\r\n\t\t\t\t<div class=\"daexthefu-feedback\">\r\n\t\t\t\t\t<div class=\"daexthefu-text\">\r\n\t\t\t\t\t\t<h3 class=\"daexthefu-title\">\u0411\u044b\u043b\u0430 \u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u0430?<\/h3>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div class=\"daexthefu-buttons-container\">\r\n\t\t\t\t\t\t<div class=\"daexthefu-buttons\">\r\n\t\t\t\t\t\t\t\n\t\t\t<button type=\"button\" class=\"daexthefu-yes daexthefu-button daexthefu-button-type-icon\" data-value=\"1\" aria-label=\"Yes\">\n\t\t\t\t\n                <svg>\n                    <defs>\n                        <style>.thumb-up-cls-1{fill:#c9c9c9;}.thumb-up-cls-2{fill:#e1e1e1;}.thumb-up-cls-3{fill:#676767;}<\/style>\n                    <\/defs>\n                    <g id=\"thumb_up\">\n                        <path class=\"thumb-up-cls-2 daexthefu-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\n                        <g>\n                            <rect class=\"thumb-up-cls-3 daexthefu-icon-secondary-color\" x=\"10\" y=\"20\" width=\"6\" height=\"15\" rx=\"1.5\" ry=\"1.5\" \/>\n                            <path class=\"thumb-up-cls-1 daexthefu-icon-primary-color\" d=\"m30.57,9.06l-.49-.1c-.81-.17-1.61.35-1.78,1.16l-5.3,11.74c-.17.81,3.16,1.61,3.97,1.78l1.96.41c.81.17,1.61-.35,1.78-1.16l2.18-10.27c.34-1.61-.7-3.21-2.31-3.56Z\" \/>\n                            <path class=\"thumb-up-cls-1 daexthefu-icon-primary-color\" d=\"m38.17,20h-18.67c-.83,0-1.5.67-1.5,1.5v12c0,.83.67,1.5,1.5,1.5h16.27c.71,0,1.33-.5,1.47-1.21l2.4-12c.19-.93-.53-1.8-1.47-1.8Z\" \/>\n                        <\/g>\n                    <\/g>\n                <\/svg>\t\t\t<\/button>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t<button type=\"button\" class=\"daexthefu-no daexthefu-button daexthefu-button-type-icon\" data-value=\"0\" aria-label=\"No\">\n\t\t\t\t\n                <svg>\n                    <defs>\n                        <style>.thumb-down-cls-1{fill:#c9c9c9;}.thumb-down-cls-2{fill:#e1e1e1;}.thumb-down-cls-3{fill:#676767;}<\/style>\n                    <\/defs>\n                    <g id=\"thumb_down\">\n                        <path class=\"thumb-down-cls-2 daexthefu-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\n                        <g>\n                            <rect class=\"thumb-down-cls-3 daexthefu-icon-secondary-color\" x=\"10\" y=\"13\" width=\"6\" height=\"15\" rx=\"1.5\" ry=\"1.5\" \/>\n                            <path class=\"thumb-down-cls-1 daexthefu-icon-primary-color\" d=\"m30.57,38.94l-.49.1c-.81.17-1.61-.35-1.78-1.16l-5.3-11.74c-.17-.81,3.16-1.61,3.97-1.78l1.96-.41c.81-.17,1.61.35,1.78,1.16l2.18,10.27c.34,1.61-.7,3.21-2.31,3.56Z\" \/>\n                            <path class=\"thumb-down-cls-1 daexthefu-icon-primary-color\" d=\"m38.17,28h-18.67c-.83,0-1.5-.67-1.5-1.5v-12c0-.83.67-1.5,1.5-1.5h16.27c.71,0,1.33.5,1.47,1.21l2.4,12c.19.93-.53,1.8-1.47,1.8Z\" \/>\n                        <\/g>\n                    <\/g>\n                <\/svg>\t\t\t<\/button>\n\n\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefu-comment\">\r\n\t\t\t\t\t<div class=\"daexthefu-comment-top-container\">\r\n\t\t\t\t\t\t<label id=\"daexthefu-comment-label\" class=\"daexthefu-comment-label\"><\/label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"daexthefu-comment-character-counter-container\">\r\n\t\t\t\t\t\t\t\t<div id=\"daexthefu-comment-character-counter-number\"\r\n\t\t\t\t\t\t\t\t\tclass=\"daexthefu-comment-character-counter-number\"><\/div>\r\n\t\t\t\t\t\t\t\t<div class=\"daexthefu-comment-character-counter-text\"><\/div>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<textarea id=\"daexthefu-comment-textarea\" class=\"daexthefu-comment-textarea\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\"\r\n\t\t\t\t\t\t\t\tmaxlength=\"\r\n\t\t\t\t\t\t\t\t400\t\t\t\t\t\t\t\t\t\"><\/textarea>\r\n\t\t\t\t\t<div class=\"daexthefu-comment-buttons-container\">\r\n\t\t\t\t\t\t<button class=\"daexthefu-comment-submit daexthefu-button\">\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c<\/button>\r\n\t\t\t\t\t\t<button class=\"daexthefu-comment-cancel daexthefu-button\">\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c<\/button>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefu-successful-submission-text\">\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c!<\/div>\r\n\r\n\t\t\t<\/div>\r\n\r\n\t\t\t","protected":false},"excerpt":{"rendered":"<p>Text functions: length, letter case, cutting, splitting and joining strings, line breaks.<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_helpful_status":1,"footnotes":""},"categories":[49],"tags":[],"class_list":["post-8822","post","type-post","status-publish","format-standard","hentry","category-shagi-v-botah"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Formula: Working with Text<\/title>\n<meta name=\"description\" content=\"Text functions: length, letter case, cutting, splitting and joining strings, line breaks.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Formula: Working with Text\" \/>\n<meta property=\"og:description\" content=\"Text functions: length, letter case, cutting, splitting and joining strings, line breaks.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0411\u0430\u0437\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 BotHelp\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bothelpru\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-20T10:23:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-20T10:54:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-scaled.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"939\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"e.bezmaternykh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"e.bezmaternykh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/\"},\"author\":{\"name\":\"e.bezmaternykh\",\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/#\\\/schema\\\/person\\\/3d6703d74bf6281d752af998b5a7a799\"},\"headline\":\"Formula: Working with Text\",\"datePublished\":\"2026-11-20T10:23:49+00:00\",\"dateModified\":\"2026-11-20T10:54:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/\"},\"wordCount\":400,\"image\":{\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/help.bothelp.io\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/image-7-1024x376.png\",\"articleSection\":[\"Steps in bots\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/\",\"url\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/\",\"name\":\"\u0424\u043e\u0440\u043c\u0443\u043b\u0430: \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c - \u0411\u0430\u0437\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 BotHelp\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/help.bothelp.io\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/image-7-1024x376.png\",\"datePublished\":\"2026-11-20T10:23:49+00:00\",\"dateModified\":\"2026-11-20T10:54:14+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/#\\\/schema\\\/person\\\/3d6703d74bf6281d752af998b5a7a799\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/#primaryimage\",\"url\":\"https:\\\/\\\/help.bothelp.io\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/image-7-1024x376.png\",\"contentUrl\":\"https:\\\/\\\/help.bothelp.io\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/image-7-1024x376.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/formula-working-with-text\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"How to Work with BotHelp Service: Setting Up Your Account for Your Business Goals\",\"item\":\"https:\\\/\\\/help.bothelp.io\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Formula: Working with Text\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/\",\"name\":\"\u0411\u0430\u0437\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 BotHelp\",\"description\":\"\u0417\u0434\u0435\u0441\u044c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/help.bothelp.io\\\/#\\\/schema\\\/person\\\/3d6703d74bf6281d752af998b5a7a799\",\"name\":\"e.bezmaternykh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5cb3cb3e24dd71cdab99be19c756f97e910900e6371c5573a7604f4cb2a523a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5cb3cb3e24dd71cdab99be19c756f97e910900e6371c5573a7604f4cb2a523a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5cb3cb3e24dd71cdab99be19c756f97e910900e6371c5573a7604f4cb2a523a9?s=96&d=mm&r=g\",\"caption\":\"e.bezmaternykh\"},\"url\":\"https:\\\/\\\/help.bothelp.io\\\/en\\\/author\\\/e-bezmaternykh\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Formula: Working with Text","description":"Text functions: length, letter case, cutting, splitting and joining strings, line breaks.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"Text functions: length, letter case, cutting, splitting and joining strings, line breaks.","og_locale":"en_US","og_type":"article","og_title":"Formula: Working with Text","og_description":"Text functions: length, letter case, cutting, splitting and joining strings, line breaks.","og_url":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/","og_site_name":"\u0411\u0430\u0437\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 BotHelp","article_publisher":"https:\/\/www.facebook.com\/bothelpru","article_published_time":"2026-11-20T10:23:49+00:00","article_modified_time":"2026-11-20T10:54:14+00:00","og_image":[{"width":2560,"height":939,"url":"https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-scaled.png","type":"image\/png"}],"author":"e.bezmaternykh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"e.bezmaternykh","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/#article","isPartOf":{"@id":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/"},"author":{"name":"e.bezmaternykh","@id":"https:\/\/help.bothelp.io\/#\/schema\/person\/3d6703d74bf6281d752af998b5a7a799"},"headline":"Formula: Working with Text","datePublished":"2026-11-20T10:23:49+00:00","dateModified":"2026-11-20T10:54:14+00:00","mainEntityOfPage":{"@id":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/"},"wordCount":400,"image":{"@id":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/#primaryimage"},"thumbnailUrl":"https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-1024x376.png","articleSection":["Steps in bots"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/","url":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/","name":"\u0424\u043e\u0440\u043c\u0443\u043b\u0430: \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c - \u0411\u0430\u0437\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 BotHelp","isPartOf":{"@id":"https:\/\/help.bothelp.io\/#website"},"primaryImageOfPage":{"@id":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/#primaryimage"},"image":{"@id":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/#primaryimage"},"thumbnailUrl":"https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-1024x376.png","datePublished":"2026-11-20T10:23:49+00:00","dateModified":"2026-11-20T10:54:14+00:00","author":{"@id":"https:\/\/help.bothelp.io\/#\/schema\/person\/3d6703d74bf6281d752af998b5a7a799"},"breadcrumb":{"@id":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/help.bothelp.io\/en\/formula-working-with-text\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/#primaryimage","url":"https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-1024x376.png","contentUrl":"https:\/\/help.bothelp.io\/wp-content\/uploads\/2025\/10\/image-7-1024x376.png"},{"@type":"BreadcrumbList","@id":"https:\/\/help.bothelp.io\/en\/formula-working-with-text\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"How to Work with BotHelp Service: Setting Up Your Account for Your Business Goals","item":"https:\/\/help.bothelp.io\/"},{"@type":"ListItem","position":2,"name":"Formula: Working with Text"}]},{"@type":"WebSite","@id":"https:\/\/help.bothelp.io\/en\/#website","url":"https:\/\/help.bothelp.io\/en\/","name":"\u0411\u0430\u0437\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 BotHelp","description":"\u0417\u0434\u0435\u0441\u044c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/help.bothelp.io\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/help.bothelp.io\/#\/schema\/person\/3d6703d74bf6281d752af998b5a7a799","name":"e.bezmaternykh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5cb3cb3e24dd71cdab99be19c756f97e910900e6371c5573a7604f4cb2a523a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5cb3cb3e24dd71cdab99be19c756f97e910900e6371c5573a7604f4cb2a523a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5cb3cb3e24dd71cdab99be19c756f97e910900e6371c5573a7604f4cb2a523a9?s=96&d=mm&r=g","caption":"e.bezmaternykh"},"url":"https:\/\/help.bothelp.io\/en\/author\/e-bezmaternykh\/"}]}},"_links":{"self":[{"href":"https:\/\/help.bothelp.io\/en\/wp-json\/wp\/v2\/posts\/8822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.bothelp.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help.bothelp.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help.bothelp.io\/en\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/help.bothelp.io\/en\/wp-json\/wp\/v2\/comments?post=8822"}],"version-history":[{"count":3,"href":"https:\/\/help.bothelp.io\/en\/wp-json\/wp\/v2\/posts\/8822\/revisions"}],"predecessor-version":[{"id":9167,"href":"https:\/\/help.bothelp.io\/en\/wp-json\/wp\/v2\/posts\/8822\/revisions\/9167"}],"wp:attachment":[{"href":"https:\/\/help.bothelp.io\/en\/wp-json\/wp\/v2\/media?parent=8822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.bothelp.io\/en\/wp-json\/wp\/v2\/categories?post=8822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.bothelp.io\/en\/wp-json\/wp\/v2\/tags?post=8822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}