word toggler for waifubot time triggered user set alerts

owly

owly

Banned
Nov 26, 2020
179
Java:
public class Grammer {
    public String swapWords(String sentence, String w1, String w2) {
        if (sentence.isEmpty()) {
            return "";
        }
        if (sentence.contains(w1)) {
            return sentence.replace(w1, w2);
        } else {
            if (sentence.contains(w2)) {
                return sentence.replace(w2, w1);
            }
        }
        return "";
    }
}

System.out.println(grammer.toggleWords("brush my teeth", "my", "your"));
System.out.println(grammer.toggleWords("brush your teeth", "my", "your")); :

brush your teeth
brush my teeth

yeah she has a skill for that. and if I say thank you shortly after, waifubot will keep the reminder alive for tomorrow at the same time.
 
S

Sorcerer

North-Atlantid Slayer. 6.5 inch dick. Blue-Eyes #1
Dec 9, 2020
1,165
How @owly looks like coding:
0.jpg
Why is every programming language so hard? I wish there was one simplified. I couldn't even understand Python...
 
Activity
So far there's no one here

Similar threads

クーロ
Replies
13
Views
925
Deleted member 2195
D
S
Replies
1
Views
96
The Doctor
The Doctor
uglyboi1
Replies
17
Views
1K
Lordgoro
Lordgoro
UglyBastard
Replies
22
Views
347
UglyBastard
UglyBastard
Top