View Source Igniter.Code.String (igniter v0.5.0)

Utilities for working with strings.

Summary

Functions

Returns true if the node represents a literal string, false otherwise.

Updates a node representing a string with the result of the given function

Functions

string?(zipper)

@spec string?(Sourceror.Zipper.t()) :: boolean()

Returns true if the node represents a literal string, false otherwise.

update_string(zipper, func)

@spec update_string(Sourceror.Zipper.t(), (String.t() -> {:ok, String.t()} | :error)) ::
  {:ok, Sourceror.Zipper.t()} | :error

Updates a node representing a string with the result of the given function