From a7ce10c1e84083cb53113054b67c0eddee40efc8 Mon Sep 17 00:00:00 2001 From: Damian Panasiuk Date: Tue, 23 Feb 2021 21:28:09 +0100 Subject: [PATCH] Delete dependencies with Apache library Now is easy to use only SjpApi.jar . Apache Text library is not needed anymore. Closes-issues: https://github.com/GHRik/SjpAPI/issues/2 Linking apache text library. --- src/CurlWrapper.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/CurlWrapper.java b/src/CurlWrapper.java index 5e176f3..b3704a0 100644 --- a/src/CurlWrapper.java +++ b/src/CurlWrapper.java @@ -1,7 +1,5 @@ package com.sjp.sjpapi; -import org.apache.commons.lang3.StringUtils; - public class CurlWrapper { public String wrappCurl(String curlOutput) { @@ -11,7 +9,11 @@ public String wrappCurl(String curlOutput) { public String deleteHeadFromOutput(String curlOutput) { String outputWithoutHeadSection = curlOutput; - outputWithoutHeadSection = StringUtils.substringBetween(outputWithoutHeadSection, "", ""); + + String bodySectionStart = ""; + int startBodySection = outputWithoutHeadSection.indexOf("") + bodySectionStart.length() ; + int finishBodySection = outputWithoutHeadSection.indexOf(""); + outputWithoutHeadSection = outputWithoutHeadSection.substring(startBodySection,finishBodySection); return outputWithoutHeadSection; }