Latest #strings Threads 
Hi!
I want to format an address in an html template using the following dynamic data.
<br>Attn: {{name}}
<br>{{street_addre...
New
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
I’m going through Tate and DeBenedetto’s Programming Phoenix LiveView and observed the code below.
defp assign_chart_svg(%{assigns: %{...
New
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
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
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
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
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
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
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
This Month's Trending
This Year's Trending
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
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
I wanted to capitalize a string, and tried using String.capitalize().
That generally works well, until you try to capitalize a word like...
New
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
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
sth like string — Common string operations — Python 3.10.4 documentation?
I really fear erlang’s ~F.P.PadModC (Erlang -- io)
New
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
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
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
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
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
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
I’m going through Tate and DeBenedetto’s Programming Phoenix LiveView and observed the code below.
defp assign_chart_svg(%{assigns: %{...
New
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
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
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
Hi Experts,
I am looking for built in function something like String builder with Placeholders.
Iet say in C like languages usuall you ...
New
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
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
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
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
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
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
Following this small benchmark experiment (https://blog.fefe.de/?ts=a2689de5), I wrote a short Elixir script to calculate the counts of d...
New
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
Can anybody explain how the comparison of Strings and characters works Elixir for single-quoted and double-quoted characters (I’m using t...
New
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
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
rest is [“a”] and last_gift is “b”.
rest |> Enum.join(", “) returns “a”, which is a string.
“a” |> “#{}, and #{last_gift}” return...
New
Latest on Elixir Forum
Get money off!
The Pragmatic Bookshelf
35% off any eBook
Manning Publications
45% off any item
ElixirCasts
10% off for life
The Pragmatic Studio
20% off any course
AppSignal
10% off for 12 months
Honeybadger
10% off for 12 months
Simply use coupon code "devtalk.com" or "elixirforum" at checkout!
Filter by Type:
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #exunit
- #elixirconf
- #discussion
- #javascript
- #podcasts
- #code-sync
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #api
- #processes
- #forms
- #metaprogramming
- #security
- #performance
- #hex







