Urlencode или трансформация для запроса

  • Автор темы Автор темы Dexio
  • Дата начала Дата начала

Dexio

Client
Регистрация
09.05.2014
Сообщения
1 256
Реакции
219
Баллы
63
Как преобразовывать текст в текст в такой вид? %D0%92%D0%B8%D0%BA%D2%82%D0%BE%D1
 
var encoding = ZennoLab.Macros.TextProcessing.UrlEncode(text)
 
PrepToJavaScriptEval Performs the text preparing for JavaScript evaluation.
RandomText Gets the random text.
RemoveDuplicates Removes duplicates.
Replace Returns a new string in which occurrences of a specified string in the current instance are replaced with another specified string.
Spintax Spintaxes the string.
Split Splits the string.
ToChar Converts the integer value in specified string to a Unicode character.
ToList Converts all items in specified string to the list of the project model.
ToLower Returns a copy of this string converted to lowercase in specified place.
ToTable Converts all items in specified string to the table of the project model.
ToUpper Returns a copy of this string converted to uppercase in specified place.
Translate Translate text through the specified DLL library.
Translit Converts the string to translit.
Trim Overloaded. Removes all leading and trailing, leading or trailing specified characters from the current String object.
UrlDecode Decodes the string from UrlEncode.
UrlEncode Encodes the string to UrlEncode.
 
Вот что дает
Тип Время Сообщение
19:40:38 Компиляция кода Ошибка в действии "CS0117" "'ZennoLab.Macros.TextProcessing' does not contain a definition for 'UrlEncode'". [Строка: 2; Cтолбец: 36]
 
Блин, раньше вроде кубиком было. Кубиком нельзя больше? http://zennolab.com/wiki/ru:actions:text
Url encode при работе с переменной? Обработка текста.
Сниппетом не получается
 
Блин, раньше вроде кубиком было. Кубиком нельзя больше? http://zennolab.com/wiki/ru:actions:text
Url encode при работе с переменной? Обработка текста.
Сниппетом не получается
Возможно, у Вас версия ниже 5.9.9.0, в которой появился такой функционал в кубике и в коде через TextProcessing.
В этом случае можно преобразовать так:
C#:
Развернуть Свернуть Копировать
return Uri.EscapeDataString("текст для кодирования");
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)