Data Types
String

String

Reverse the string

import { reverseString } from "quark-dsa";
 
let str = "quark";
reverseString(str); // returns 'krauq'

Check a string is palindrome

import { isStringPalindrome } from "quark-dsa";
 
let str = "racecar";
isStringPalindrome(str); // returns true;

Sort the string

import { sortString } from "quark-dsa";
 
let str = "mississippi";
sortString(str); //returns iiiimppssss

Words list in the sentence

import { getWords } from "quark-dsa";
 
let str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit";
getWords(str); //returns ["Lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit"]