Latest #strings Threads Top

bgpratt2000
Hi! I want to format an address in an html template using the following dynamic data. <br>Attn: {{name}} <br>{{street_addre...
New
zlost
I’m new to elixir and I want to know how to format a string with unicode args code IO.puts(:io_lib.format("hello ~10s ~n", ["👻"])) resu...
New
spencer.christensen
I’m going through Tate and DeBenedetto’s Programming Phoenix LiveView and observed the code below. defp assign_chart_svg(%{assigns: %{...
New
marick
I’d like to be able to attach attributes to ranges within a string. Since I’m writing prototypes/spikes in Elixir for an eventual MacOS a...
New
mruoss
Hey, does anybody know if it is possible to escape escape characters like \r or \u2003? Given a string containing such characters, I’d li...
New
H8rs
Hi, I have a pretty basic question, what is the time complexity of code points? In other languages ive used, a lookup table is employed...
New
roganjoshua
I am trying to process a text file like a kind of plain text guitar tab with etc. a bit like the Ultimate Guitar Tab site. Each line wil...
New
chrisdel101
Back Story: I’m trying to add all the timezones to my DB as an enum. I already do this with smaller values (not timezone-related) and it ...
New
mlen
Hi, y’ all! I want to wrap each string from the list of strings in double quotes - so given a string: my_string = "bilbao, newcastle-...
New
coen.bakker
When I define successive functions that return a string I get the error: unexpected reserved word: end HINT: it looks like the "end...
New

This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

csokun
What is the fastest way to split a large string into multiple chunks by size e.g breaking 10MB long string into multiple chunks of 5KB each?
New

Last Three Year's Trending Top

idi527
I’ve been re-reading swift book again and noticed that multiline strings there don’t have a trailing line break, unlike in elixir iex(2)...
New
mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New
ltgaxkeh
Hello! Sorry for the dumb question but how do I display a variable in template. Let’s say I have an input in template and a button for su...
New
marick
I’d like to print “zero reservations”, “one reservation”, “two reservations”, etc. I can use inflex to get plurals and singulars, but I c...
New
Sebb
sth like string — Common string operations — Python 3.10.4 documentation? I really fear erlang’s ~F.P.PadModC (Erlang -- io)
New
mruoss
Hey, does anybody know if it is possible to escape escape characters like \r or \u2003? Given a string containing such characters, I’d li...
New
jnnks
I am reading a video file and want to create an Nx Tensors for each frame: frames = file_contents # list of binaries |> Enum.map(fn...
New
roganjoshua
I am trying to process a text file like a kind of plain text guitar tab with etc. a bit like the Ultimate Guitar Tab site. Each line wil...
New
H8rs
Hi, I have a pretty basic question, what is the time complexity of code points? In other languages ive used, a lookup table is employed...
New
marick
I’d like to be able to attach attributes to ranges within a string. Since I’m writing prototypes/spikes in Elixir for an eventual MacOS a...
New
zlost
I’m new to elixir and I want to know how to format a string with unicode args code IO.puts(:io_lib.format("hello ~10s ~n", ["👻"])) resu...
New
spencer.christensen
I’m going through Tate and DeBenedetto’s Programming Phoenix LiveView and observed the code below. defp assign_chart_svg(%{assigns: %{...
New
bgpratt2000
Hi! I want to format an address in an html template using the following dynamic data. <br>Attn: {{name}} <br>{{street_addre...
New

Trending Over Three Years Top

shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
DimWell
Hi Experts, I am looking for built in function something like String builder with Placeholders. Iet say in C like languages usuall you ...
New
Papillon6814
Hello. I’m working on running python file by elixir. The python file returns dict, and elixir parses it as map. But its keys are charlis...
New
scouten
I have a list of bytes that might be in UTF-8 or might be in ISO-8859-1 or might be in some other code format. In some cases, I have a hi...
New
Papillon6814
Hello. I want to trim “s” from this sentence. "aassddaa" Then, I use String.trim/2 to trim “s”. iex(1)> a = "aassddaa" "aassddaa" ...
New
henrique-marcomini-m
I have the following code: defp has_char_in_string?(value), do: Regex.match?(~r/[^\d]/, value) def somefun(arg) do case has_char_...
New
zcking
I’m trying to figure out how to print out the contents of a string variable, without it interpreting the characters like \n and \t as new...
New
Jaypee
As I have to generate several atoms from strings and as atoms are not garbage collected and there’s a limit for each process, does this f...
New
serpent
Following this small benchmark experiment (https://blog.fefe.de/?ts=a2689de5), I wrote a short Elixir script to calculate the counts of d...
New
tanweerdev
Due to some requirements my colleague used to_string for numbers and arrays(basically any value) to store as map like this %{value: value...
New
belgoros
Can anybody explain how the comparison of Strings and characters works Elixir for single-quoted and double-quoted characters (I’m using t...
New
cohen
I have some code that finds all instances of the characters , %, and _, inserting a backslash in front of them to escape them in the resu...
New
shahryarjb
Hi, I have a list which includes some string or integer item that I need to convert it to string with a character like “/”, then I used E...
New
sihui_io
rest is [“a”] and last_gift is “b”. rest |> Enum.join(", “) returns “a”, which is a string. “a” |> “#{}, and #{last_gift}” return...
New
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement