autoTrimTrailingNewLine() — spring-boot Function Reference
Architecture documentation for the autoTrimTrailingNewLine() function in ConfigTreePropertySource.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 73e233a4_c457_559f_8a64_440593e17dd1["autoTrimTrailingNewLine()"] 87f5befc_85d2_33e7_9265_9b499c302abf["toString()"] 87f5befc_85d2_33e7_9265_9b499c302abf -->|calls| 73e233a4_c457_559f_8a64_440593e17dd1 e4e610f9_9fe4_3db2_d63d_b9be8fa401c8["length()"] 73e233a4_c457_559f_8a64_440593e17dd1 -->|calls| e4e610f9_9fe4_3db2_d63d_b9be8fa401c8 34d1d879_54da_e7f6_e4c8_9bf601501565["charAt()"] 73e233a4_c457_559f_8a64_440593e17dd1 -->|calls| 34d1d879_54da_e7f6_e4c8_9bf601501565 style 73e233a4_c457_559f_8a64_440593e17dd1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/env/ConfigTreePropertySource.java lines 319–335
private String autoTrimTrailingNewLine(String string) {
if (!string.endsWith("\n")) {
return string;
}
int numberOfLines = 0;
for (int i = 0; i < string.length(); i++) {
char ch = string.charAt(i);
if (ch == '\n') {
numberOfLines++;
}
}
if (numberOfLines > 1) {
return string;
}
return (string.endsWith("\r\n")) ? string.substring(0, string.length() - 2)
: string.substring(0, string.length() - 1);
}
Domain
Subdomains
Calls
- charAt()
- length()
Called By
Source
Frequently Asked Questions
What does autoTrimTrailingNewLine() do?
autoTrimTrailingNewLine() is a function in the spring-boot codebase.
What does autoTrimTrailingNewLine() call?
autoTrimTrailingNewLine() calls 2 function(s): charAt, length.
What calls autoTrimTrailingNewLine()?
autoTrimTrailingNewLine() is called by 1 function(s): toString.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free