getResourceText

Reads the text content of a resource file.

This function locates a resource file by its name, reads its entire content as a String, and normalizes line endings to '\n'.

Return

The text content of the resource file as a String.

Parameters

name

The name of the resource file (e.g., "my_text_file.txt"). The resource is expected to be found in the classpath.

Throws

if the resource with the given name is not found.